The role was not covered by any automated test, so regressions in the drop-in file handling only surfaced on real hosts. The scenario starts one container per supported distribution family and covers all four conditional branches of tasks/main.yaml: a user, a user acting as another user, a group and a group acting as another user. Beside the created rules the verification asserts that a rule declared as absent is removed again, that the drop-in directory is included exactly once and that visudo accepts the resulting configuration, because a rejected drop-in file invalidates every rule of the directory. Co-authored-by: Copilot <copilot@github.com>
25 lines
598 B
YAML
25 lines
598 B
YAML
---
|
|
|
|
driver:
|
|
name: default
|
|
options:
|
|
managed: true
|
|
login_cmd_template: "docker exec --interactive --tty {instance} bash"
|
|
|
|
platforms:
|
|
- name: sudo-archlinux
|
|
image: docker.io/library/archlinux:base
|
|
- name: sudo-debian
|
|
image: docker.io/library/debian:13
|
|
- name: sudo-fedora
|
|
image: registry.fedoraproject.org/fedora:43
|
|
|
|
provisioner:
|
|
name: ansible
|
|
# The role under test is the project directory itself, so its parent has to be on the roles path.
|
|
env:
|
|
ANSIBLE_ROLES_PATH: "${MOLECULE_PROJECT_DIRECTORY}/.."
|
|
config_options:
|
|
defaults:
|
|
interpreter_python: auto_silent
|