Hi,
This is what I'm getting:-
Working without sudo. But not with sudo option.
ansibledir$ ansible all -m command -a 'whoami'
| SUCCESS | rc=0 >>
pranjan
ansibledir$ ansible all -m command -a 'whoami' --sudo -K
SUDO password:
| FAILED! => {
"changed": false,
"failed": true,
I am also facing the same issue. tried several options but no solution.
Unable to take privilege of "sudo su -".
This is content of my playbook. Commented ones shows that I have tried
those options. I have also tried many options with command lines.
---
- hosts: all
# remote_user: root
#