molecule 6.0.3 using python 3.9
ansible:2.15.7
azure:23.5.3 from molecule_plugins
containers:23.5.3 from molecule_plugins requiring collections: ansible.posix>=1.3.0 community.docker>=1.9.1 containers.podman>=1.8.1
default:6.0.3 from molecule
docker:23.5.3 from molecule_plugins requiring collections: community.docker>=3.4.11 ansible.posix>=1.4.0
SUMMARY
When deploying an icinga2 agent on a debian based system the install of the dependencies (e.g. gnupg2) fails if there was never an apt update made on the system.
In my case this happens while playbook testing using molecule with docker using the image geerlingguy/docker-debian11-ansible
This should be fixed by setting a update_cache: true in the Install dependencies for debian-based distributions task
STEPS TO REPRODUCE
Setup a minimal role which includes icinga2_agent and test it with molecule and a debian image like geerlingguy/docker-debian11-ansible
EXPECTED RESULTS
It works
ACTUAL RESULTS
ASK [ansible-role-icinga2_agent : Install dependencies for debian-based distributions] ***
failed: [instance] (item=gnupg2) => {"ansible_loop_var": "item", "changed": false, "item": "gnupg2", "msg": "No package matching 'gnupg2' is available"}
ISSUE TYPE
ANSIBLE VERSION
CONFIGURATION
-
OS / ENVIRONMENT
AlmaLinux 9.3
molecule 6.0.3 using python 3.9 ansible:2.15.7 azure:23.5.3 from molecule_plugins containers:23.5.3 from molecule_plugins requiring collections: ansible.posix>=1.3.0 community.docker>=1.9.1 containers.podman>=1.8.1 default:6.0.3 from molecule docker:23.5.3 from molecule_plugins requiring collections: community.docker>=3.4.11 ansible.posix>=1.4.0
SUMMARY
When deploying an icinga2 agent on a debian based system the install of the dependencies (e.g. gnupg2) fails if there was never an
apt update
made on the system. In my case this happens while playbook testing using molecule with docker using the imagegeerlingguy/docker-debian11-ansible
This should be fixed by setting a
update_cache: true
in theInstall dependencies for debian-based distributions
taskSTEPS TO REPRODUCE
Setup a minimal role which includes icinga2_agent and test it with molecule and a debian image like
geerlingguy/docker-debian11-ansible
EXPECTED RESULTS
It works
ACTUAL RESULTS