Add tests of more modern distros

Buster goes EOL in June 2024, so it's good time to add testing of more
distros, including latest Debian 12 and Ubuntu 22.04 as latest LTS at
the moment.

Change-Id: I62dafeef2e2483631cabb10e8f2c289dfb726bea
This commit is contained in:
Dmitriy Rabotyagov 2024-02-27 18:15:58 +01:00
parent 32dc34c70b
commit 2a375f9f81
3 changed files with 65 additions and 7 deletions

View File

@ -1,12 +1,12 @@
--- ---
- nodeset: - nodeset:
name: debian-buster-2-node name: debian-bookworm-2-node
nodes: nodes:
- name: primary - name: primary
label: debian-buster label: debian-bookworm
- name: secondary - name: secondary
label: debian-buster label: debian-bookworm
groups: groups:
- name: switch - name: switch
nodes: nodes:
@ -20,16 +20,38 @@
name: ffrouting-deploy name: ffrouting-deploy
parent: base parent: base
run: tests/test.yml run: tests/test.yml
nodeset: debian-buster-2-node nodeset: debian-bookworm-2-node
- job:
name: tox-molecule-buster
parent: tox-molecule
vars:
tox_envlist: molecule-buster
- job:
name: tox-molecule-bookworm
parent: tox-molecule
vars:
tox_envlist: molecule-bookworm
- job:
name: tox-molecule-jammy
parent: tox-molecule
vars:
tox_envlist: molecule-jammy
- project: - project:
check: check:
jobs: jobs:
- ffrouting-deploy - ffrouting-deploy
- tox-linters - tox-linters
- tox-molecule - tox-molecule-buster
- tox-molecule-bookworm
- tox-molecule-jammy
gate: gate:
jobs: jobs:
- ffrouting-deploy - ffrouting-deploy
- tox-linters - tox-linters
- tox-molecule - tox-molecule-buster
- tox-molecule-bookworm
- tox-molecule-jammy

View File

@ -6,6 +6,9 @@
iproute_package_name: iproute_package_name:
redhat: iproute redhat: iproute
debian: iproute2 debian: iproute2
iputils_package_name:
redhat: iputils
debian: iputils-ping
tasks: tasks:
- name: Install required packages - name: Install required packages
package: package:
@ -15,6 +18,7 @@
with_items: with_items:
- ca-certificates - ca-certificates
- "{{ iproute_package_name[ansible_facts['os_family'] | lower] }}" - "{{ iproute_package_name[ansible_facts['os_family'] | lower] }}"
- "{{ iputils_package_name[ansible_facts['os_family'] | lower] }}"
- name: Clear gathered facts - name: Clear gathered facts
meta: clear_facts meta: clear_facts

34
tox.ini
View File

@ -40,11 +40,43 @@ commands =
ansible-lint {toxinidir}/molecule/default/playbook.yml ansible-lint {toxinidir}/molecule/default/playbook.yml
yamllint {toxinidir} yamllint {toxinidir}
[testenv:molecule]
[molecule]
deps = deps =
{[testenv]deps} {[testenv]deps}
docker docker
molecule molecule
molecule-plugins[docker] molecule-plugins[docker]
commands = commands =
molecule test molecule test
setenv =
{[testenv]setenv}
[testenv:molecule-buster]
deps =
{[molecule]deps}
commands =
{[molecule]commands}
setenv =
{[molecule]setenv}
docker_image_tag=debian-systemd:buster
[testenv:molecule-bookworm]
deps =
{[molecule]deps}
commands =
{[molecule]commands}
setenv =
{[molecule]setenv}
docker_image_tag=debian-systemd:bookworm
[testenv:molecule-jammy]
deps =
{[molecule]deps}
commands =
{[molecule]commands}
setenv =
{[molecule]setenv}
docker_image_tag=ubuntu-systemd:jammy