Closed singaravellu closed 4 years ago
Make sure ansible user have sudo permisions on remote host edit /etc/sudoers file add entry for anisble user
i have added user to sudo group by executing the sudo usermod -aG sudo ansible
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
ok thank you it's working
here is the inventory here is the playbookfile