Friday, June 4, 2021

To enable Sudo access on particular without password.

 edit visudo file on ubuntu and centos

add this line to get sudo access on ansible account without password

## Allow root to run any commands anywhere

root    ALL=(ALL)       ALL

ansible ALL=(ALL)       NOPASSWD: ALL


now for sudo access need to run command with -b 

ansible node -b -a "reboot"


ansible node* -m setup to check node info

No comments: