From 3bf13e214d44927d4f2396b6ba3d2e277ec6bff0 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 22 Sep 2026 16:45:01 +0200 Subject: [PATCH] Address ansible-galaxy fetching issues. Intermittent issues reaching Ansible's galaxy for molecule dependencies. This can be worked around by creating tests/requirements.yml, which is parsed by default with ansible-compat, and it does proceed with installation first. If all dependencies are already present, molecule won't attempt reaching galaxy. We see a lot of failures recently on CentOS 10 Stream. Change-Id: I9abc7de610b072602b2b12549f4db07dd9a476dd Signed-off-by: Dmitriy Rabotyagov --- molecule/default/molecule.yml | 6 ++---- requirements.yml | 5 +++++ tests/requirements.yml | 11 +++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 tests/requirements.yml diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index de0f487..0078db8 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -1,9 +1,7 @@ --- dependency: name: galaxy - options: - requirements-file: requirements.yml - force: true + enabled: false driver: name: docker @@ -27,7 +25,7 @@ provisioner: defaults: inject_facts_as_vars: false options: - diff: True + diff: true scenario: name: default diff --git a/requirements.yml b/requirements.yml index 72fe72d..27d312b 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,2 +1,7 @@ collections: + - name: community.library_inventory_filtering_v1 + source: https://github.com/ansible-collections/community.library_inventory_filtering + type: git - name: community.general + source: https://github.com/ansible-collections/community.general + type: git diff --git a/tests/requirements.yml b/tests/requirements.yml new file mode 100644 index 0000000..9763cbb --- /dev/null +++ b/tests/requirements.yml @@ -0,0 +1,11 @@ +--- +collections: + - name: community.library_inventory_filtering_v1 + source: https://github.com/ansible-collections/community.library_inventory_filtering + type: git + - name: community.docker + source: https://github.com/ansible-collections/community.docker + type: git + - name: ansible.posix + source: https://github.com/ansible-collections/ansible.posix + type: git