QT-DevOps / DevOpsIssues

This Repo will be used to demonstrate the Skills & Questions in DevOps
Apache License 2.0
27 stars 130 forks source link

while executing Ansible-playbook facing the below issue could anyonehelp #932

Closed singaravellu closed 4 years ago

singaravellu commented 4 years ago

image here is the inventory image here is the playbookfile image

ghost commented 4 years ago

Make sure ansible user have sudo permisions on remote host edit /etc/sudoers file add entry for anisble user

singaravellu commented 4 years ago

i have added user to sudo group by executing the sudo usermod -aG sudo ansible

ghost commented 4 years ago

By adding user to sudo group using usermod user will ask for password when we try to become sudo. so we need user which has sudo permissions and password should not be asked. add <user> ALL:ALL NOPASSWD:ALL entry in /etc/sudoers file

singaravellu commented 4 years ago

ok thank you it's working ALL=(ALL:ALL) NOPASSWD:ALL