Closed lvnilesh closed 2 years ago
There is some tricks for setting up this Ansible Role for direct use with Molecule, please check https://github.com/alvistack/ansible-role-podman/blob/master/.gitlab-ci.yml#L70-L79 for some reference, e.g.
mkdir -p $HOME/.ansible/roles
cd $HOME/.ansible/roles
git clone -b develop https://github.com/alvistack/ansible-role-podman.git alvistack.podman
cd alvistack.podman
molecule converge -s default
P.S. Please kindly understand by default Ansible Role is NOT designed as working independently, but being used by a wrapper Ansible Playbook (well, here by default means official Ansible logic).
This hack using molecule converge -s default
for localhost provision is based on following tricks:
delegated
driver (see https://github.com/alvistack/ansible-role-podman/blob/master/molecule/default/molecule.yml#L18)$HOME/.ansible/roles/alvistack.podman
correctly, so the coverage.yml
could reference it correctly (see https://github.com/alvistack/ansible-role-podman/blob/master/molecule/default/converge.yml#L44)If this all matched correctly as like as my https://github.com/alvistack/ansible-role-podman/blob/master/.gitlab-ci.yml setup, it should be working without any issue ;-)
fails with the following