Skip to content

Commit

Permalink
Merge pull request #23 from andreygubarev/support-debian-bookworm
Browse files Browse the repository at this point in the history
Support Debian Bookworm
  • Loading branch information
andreygubarev authored Aug 22, 2023
2 parents 3a9dec5 + b5c864d commit ed1162f
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 5 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ test-%: virtualenv
.PHONY: test-network
test-network: test-network-shared test-network-user ## Test network

.PHONY: test-os-debian
test-os-debian: test-os-debian-bullseye test-os-debian-bookworm ## Test Debian OS

.PHONY: test-os-ubuntu
test-os-ubuntu: test-os-ubuntu-focal test-os-ubuntu-jammy ## Test Ubuntu OS

.PHONY: test-os
test-os: test-os-debian-bullseye test-os-ubuntu-focal test-os-ubuntu-jammy ## Test OS
test-os: test-os-debian test-os-ubuntu ## Test OS

.PHONY: test-platform
test-platform: test-platform-amd64 test-platform-arm64 ## Test platform
Expand Down
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Supported platforms:

Support guest OS:
* Debian 11 (arm64, amd64)
* Debian 12 (arm64, amd64)
* Ubuntu 20.04 LTS (arm64, amd64)
* Ubuntu 22.04 LTS (arm64, amd64)

Expand Down Expand Up @@ -141,27 +142,38 @@ platforms:
image_checksum: sha512:https://cloud.debian.org/images/cloud/bullseye/latest/SHA512SUMS
network_ssh_port: 2223
- name: debian-bookworm-amd64
image_url: https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2
image_checksum: sha512:https://cloud.debian.org/images/cloud/bookworm/latest/SHA512SUMS
network_ssh_port: 2224
- name: debian-bookworm-arm64
image_arch: aarch64
image_url: https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-arm64.qcow2
image_checksum: sha512:https://cloud.debian.org/images/cloud/bookworm/latest/SHA512SUMS
network_ssh_port: 2225
- name: ubuntu-focal-amd64
image_url: https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
image_checksum: sha256:https://cloud-images.ubuntu.com/focal/current/SHA256SUMS
network_ssh_port: 2224
network_ssh_port: 2226
- name: ubuntu-focal-arm64
image_arch: aarch64
image_url: https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-arm64.img
image_checksum: sha256:https://cloud-images.ubuntu.com/focal/current/SHA256SUMS
network_ssh_port: 2225
network_ssh_port: 2227
- name: ubuntu-jammy-amd64
image_url: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
image_checksum: sha256:https://cloud-images.ubuntu.com/jammy/current/SHA256SUMS
network_ssh_port: 2226
network_ssh_port: 2228
- name: ubuntu-jammy-arm64
image_arch: aarch64
image_url: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-arm64.img
image_checksum: sha256:https://cloud-images.ubuntu.com/jammy/current/SHA256SUMS
network_ssh_port: 2227
network_ssh_port: 2229
```

## Cloud Images URLs
Expand All @@ -172,6 +184,9 @@ For convenience, here are the URLs for the cloud images used in the examples abo
* https://cloud.debian.org/images/cloud/bullseye/latest/SHA512SUMS
* https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-amd64.qcow2
* https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-genericcloud-arm64.qcow2
* https://cloud.debian.org/images/cloud/bookworm/latest/SHA512SUMS
* https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2
* https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-arm64.raw

### [Ubuntu](https://cloud-images.ubuntu.com/)
* https://cloud-images.ubuntu.com/focal/current/SHA256SUMS
Expand All @@ -184,6 +199,7 @@ For convenience, here are the URLs for the cloud images used in the examples abo
# Troubleshooting

Molecule working directory is: `~/.cache/molecule/<role-name>/<scenario-name>`.

QEMU images caches is: `~/.cache/molecule/.qemu`.

# Motivation
Expand Down
12 changes: 12 additions & 0 deletions tests/molecule/os-debian-bookworm/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- name: Converge
hosts: all

environment:
http_proxy: "{{ lookup('ansible.builtin.env', 'http_proxy') | default(omit) }}"
https_proxy: "{{ lookup('ansible.builtin.env', 'https_proxy') | default(omit) }}"

tasks:
- name: "Include tests"
ansible.builtin.include_role:
name: "tests"
19 changes: 19 additions & 0 deletions tests/molecule/os-debian-bookworm/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
dependency:
name: galaxy
driver:
name: molecule-qemu
platforms:
- name: debian-bookworm-amd64
image_url: https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2
image_checksum: sha512:https://cloud.debian.org/images/cloud/bookworm/latest/SHA512SUMS
network_ssh_port: 2222
- name: debian-bookworm-arm64
image_arch: aarch64
image_url: https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-arm64.qcow2
image_checksum: sha512:https://cloud.debian.org/images/cloud/bookworm/latest/SHA512SUMS
network_ssh_port: 2223
provisioner:
name: ansible
verifier:
name: ansible
18 changes: 18 additions & 0 deletions tests/molecule/os-debian-bookworm/prepare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
- name: Prepare
hosts: all
become: true
gather_facts: false

environment:
http_proxy: "{{ lookup('ansible.builtin.env', 'http_proxy') | default(omit) }}"
https_proxy: "{{ lookup('ansible.builtin.env', 'https_proxy') | default(omit) }}"

tasks:
- name: Wait for SSH to become available
ansible.builtin.wait_for_connection:
delay: 5
timeout: 300

- name: Gather facts
ansible.builtin.setup:
10 changes: 10 additions & 0 deletions tests/molecule/os-debian-bookworm/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# This is an example playbook to execute Ansible tests.

- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
ansible.builtin.assert:
that: true

0 comments on commit ed1162f

Please sign in to comment.