From 3ba0417f570ca0a3dc69152134636517fcc6f5fd Mon Sep 17 00:00:00 2001 From: Andrey Gubarev Date: Wed, 23 Aug 2023 03:19:31 +0400 Subject: [PATCH 1/3] add tests for debian bookworm --- Makefile | 8 +++++++- .../molecule/os-debian-bookworm/converge.yml | 12 ++++++++++++ .../molecule/os-debian-bookworm/molecule.yml | 19 +++++++++++++++++++ tests/molecule/os-debian-bookworm/prepare.yml | 18 ++++++++++++++++++ tests/molecule/os-debian-bookworm/verify.yml | 10 ++++++++++ 5 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 tests/molecule/os-debian-bookworm/converge.yml create mode 100644 tests/molecule/os-debian-bookworm/molecule.yml create mode 100644 tests/molecule/os-debian-bookworm/prepare.yml create mode 100644 tests/molecule/os-debian-bookworm/verify.yml diff --git a/Makefile b/Makefile index 71b96fc..d6e31b3 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/tests/molecule/os-debian-bookworm/converge.yml b/tests/molecule/os-debian-bookworm/converge.yml new file mode 100644 index 0000000..8d580ce --- /dev/null +++ b/tests/molecule/os-debian-bookworm/converge.yml @@ -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" diff --git a/tests/molecule/os-debian-bookworm/molecule.yml b/tests/molecule/os-debian-bookworm/molecule.yml new file mode 100644 index 0000000..a7196f3 --- /dev/null +++ b/tests/molecule/os-debian-bookworm/molecule.yml @@ -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 diff --git a/tests/molecule/os-debian-bookworm/prepare.yml b/tests/molecule/os-debian-bookworm/prepare.yml new file mode 100644 index 0000000..ce23c04 --- /dev/null +++ b/tests/molecule/os-debian-bookworm/prepare.yml @@ -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: diff --git a/tests/molecule/os-debian-bookworm/verify.yml b/tests/molecule/os-debian-bookworm/verify.yml new file mode 100644 index 0000000..a5cfa75 --- /dev/null +++ b/tests/molecule/os-debian-bookworm/verify.yml @@ -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 From 0aba2e1a971d9febbafd102414576a5507cf9502 Mon Sep 17 00:00:00 2001 From: Andrey Gubarev Date: Wed, 23 Aug 2023 03:21:39 +0400 Subject: [PATCH 2/3] update readme with debian 12 support --- README.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3fd09b5..e80ff59 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 @@ -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 From b5c864dfa544776c5ebb640a074a4a0cfdcf515a Mon Sep 17 00:00:00 2001 From: Andrey Gubarev Date: Wed, 23 Aug 2023 03:22:24 +0400 Subject: [PATCH 3/3] small readme changes --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e80ff59..366f33c 100644 --- a/README.md +++ b/README.md @@ -199,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//`. + QEMU images caches is: `~/.cache/molecule/.qemu`. # Motivation