Enhancement []
Summary of Request
The check for the user having a sudo password to ensure users do not get locked out on a later controls fails if the user is root as this does not required sudo
Describe alternatives you've considered
Do not run when user == root
Get the command to run if - ansible_env.SUDO_USER is defined
Suggested Code
conditional for ansible_env.SUDO_USER is defined
This covers off that any super user not just root could have full su permissions so will only run if the playbook being run using a user that requires sudo
Enhancement [] Summary of Request The check for the user having a sudo password to ensure users do not get locked out on a later controls fails if the user is root as this does not required sudo
Describe alternatives you've considered Do not run when user == root Get the command to run if - ansible_env.SUDO_USER is defined
Suggested Code conditional for ansible_env.SUDO_USER is defined This covers off that any super user not just root could have full su permissions so will only run if the playbook being run using a user that requires sudo