sudo
Tags: system, sudo
Secrets needed: No
Runs on: All machines
Grants passwordless sudo to the current user and cleans up old sudoers entries.
What It Does
- Writes a sudoers drop-in at
/etc/sudoers.d/zz-<user>grantingNOPASSWD:ALL - Validates the file with
visudo -cfbefore deploying - Removes old/conflicting sudoers files from previous naming conventions
Notes
- Required for unattended playbook runs — many tasks use
become: true - The
zz-prefix ensures this file loads last, overriding any earlier restrictions