I'm preparing some Ansible roles to open their source code by adding Molecule tests.
As always,
@geerlingguyJeff Geerling has wonderful content for that 馃檹
- https://github.com/geerlingguy/ansible-role-postgresql/tree/master/molecule
- https://www.jeffgeerling.com/blog/2018/testing-your-ansible-roles-molecule
- https://github.com/geerlingguy/docker-debian12-ansible
I can't manage to run systemd commands in my docker setup ("Service is in unknown state"). When I start a container manually, I can use systemctl. But it fails when Molecule creates the container.
Any idea?
molecule.yml:
```
driver:
name: docker
platforms:
- name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRIB:-debian12}-ansible:latest"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
pre_build_image: true
provisioner:
name: ansible
env:
ANSIBLE_ROLES_PATH: ../../../../roles
```