I'm creating a sudo role and want to test with Molecule that the role fails if a rule is not correct.
How can we define that we expect the playbook to fail with Molecule?
For example, if I have the following configuration:
sudo__entries:
- name: super_alice
content: "alice ALL NOPASSWD"
The role will fail because visudo
won't validate the file.
And that's the behavior I want to test.