--- dependency: name: galaxy driver: # Specifies the driver that should be used. Podman should also work name: docker # Linting with yamllint and ansible-lint # verify.yml is skipped because it uses the shell: module, which would trigger # a linting error. lint: | yamllint . ansible-lint --exclude=molecule/default/verify.yml platforms: # Set name and hostname - name: ns1 hostname: ns1 # Specify which image should be used. Geerlingguys images are Ansible # compatible and have Systemd installed image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" # Command to execute when the container starts command: ${MOLECULE_DOCKER_COMMAND:-""} # Volumes to mount within the container. Important to enable systemd volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw # Give extended privileges to the container. Necessary for Systemd to # operate within the container. DO NOT use extended privileges in a # production environment! privileged: true # Allocate pseudo-TTY tty: true environment: container: docker - name: ns2 hostname: ns2 image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" command: ${MOLECULE_DOCKER_COMMAND:-""} volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw privileged: true tty: true environment: container: docker provisioner: name: ansible # Runs the verify.yml playbook verifier: name: ansible