How could I create a list for all possible commands an ansible-playbook
is using so that I could create a sudoers
file?
For testing the playbooks, temporally I create an entry in the /etc/sudoers.d
:
tempuser ALL=(ALL:ALL) NOPASSWD:ALL
But is there a plugin or way to get like the list of commands so that I could later create a list like
tempuser ALL= NOPASSWD: /bin/systemctl start mariadb.service
...
Any ideas?
question from:https://stackoverflow.com/questions/66046666/programmatically-create-sudo-rules-for-running-ansible-playbook