For automated molecule tests for ansible I use this images for an easy use in my ansible projects.
The images are build automatically from the main
branch.
Available OSes:
debian
ubuntu
Available facets
basic
- just a basic os installation with minimalistic toolswith_docker
- same asbasic
+ docker and docker-compose installwith_podman
- same asbasic
+ podman and podman-compose install
All combinations can be retrieved with the following way in your molecule.yaml
.
The image has the pattern {{ os }}-{{ facet }}
for its tags.
platforms:
- name: molecule-ubuntu
image: ghcr.io/poeschl/molecule-test-image:${MOLECULE_OS:-ubuntu}-basic
command: ${MOLECULE_DOCKER_COMMAND:-""}
privileged: true
pre_build_image: true
To test you roles and playbooks with an non-root user you can use the user rootless
with uid 1000
.
provisioner:
name: ansible
connection_options:
ansible_ssh_user: rootless