From f9c451ec024ed0dd456eb4e5b77d2f017a377d2d Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 3 Mar 2026 13:51:59 +0100 Subject: [PATCH] Symlink the role into tests Ansible Core 2.19 has a different set of default paths to look for roles so molecule test is failing now. Let's create a symlink of the role into the tests repo for the test playbook to find content of the role easily. Change-Id: I39b99208b4991c44e0cc9c489e7b34d80ab94855 Signed-off-by: Dmitriy Rabotyagov --- molecule/default/molecule.yml | 2 +- requirements.yml | 3 +++ tests/roles/haproxy_server | 1 + tests/test.yml | 2 +- tests/test_service_updates.yml | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) create mode 120000 tests/roles/haproxy_server diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 7139b0dd..dff0c1c8 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -9,7 +9,7 @@ driver: platforms: - name: "haproxy-${MOLECULE_SCENARIO_NAME}" - image: "${DOCKER_REGISTRY:-quay.io/gotmax23}/${DOCKER_IMAGE_TAG:-debian-systemd:bookworm}" + image: "${DOCKER_REGISTRY:-quay.io/gotmax23}/${DOCKER_IMAGE_TAG:-debian-systemd:trixie}" command: ${DOCKER_COMMAND:-""} pre_build_image: true privileged: true diff --git a/requirements.yml b/requirements.yml index bb5bee1e..9f2033b1 100644 --- a/requirements.yml +++ b/requirements.yml @@ -8,6 +8,9 @@ collections: - name: community.crypto source: https://github.com/ansible-collections/community.crypto type: git + - name: https://opendev.org/openstack/openstack-ansible-plugins + type: git + version: master - name: ansible.utils source: https://github.com/ansible-collections/ansible.utils type: git diff --git a/tests/roles/haproxy_server b/tests/roles/haproxy_server new file mode 120000 index 00000000..6581736d --- /dev/null +++ b/tests/roles/haproxy_server @@ -0,0 +1 @@ +../../ \ No newline at end of file diff --git a/tests/test.yml b/tests/test.yml index f3cae63e..036486c6 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -18,4 +18,4 @@ vars_files: - test-vars.yml roles: - - "{{ playbook_dir | dirname | basename }}" + - haproxy_server diff --git a/tests/test_service_updates.yml b/tests/test_service_updates.yml index 9e781d59..7222075a 100644 --- a/tests/test_service_updates.yml +++ b/tests/test_service_updates.yml @@ -9,4 +9,4 @@ - haproxy_service_name: test_absent_service state: absent roles: - - "{{ playbook_dir | dirname | basename }}" + - haproxy_server