I need execute ansible adhoc command.
$ ansible somehost -m command -a "cat /etc/passwd"-u someuser --ask-sudo-pass
I have an user account (someuser) with sudo
privilege. Usually I became root sudo su -
.
How to use adhoc command with sudo su -
?
ansible version is 2.0.0.2
--sudo
to that commandline. If that works I'll explain it in an answer.