Sudo syntax help, please.

User@server ~/ ansible server2 -i group.ini -m shell -a “cd /tmp/tmp; /usr/bin/tar xf …/data.tar --same-permissions --same-owner” --sudo -K

sudo password:

sslmioq | FAILED => ssh connection closed waiting for sudo or su password prompt

Why?

Thanks

Hi, does that user have NOPASSWD set in /etc/sudoers, or is there any other relevant sudo configuration you’ve setup? This may also be caused by a PAM lookup to a centralized authentication system (ie. LDAP or Active Directory) which is taking a long amount of time to return.

ansible with basically the same command line arguments works here. Perhaps it’s a problem with how sudo is setup on the remote box.

If you add -vvv to your ansible command line it will output some more information about what it’s executing on the remote machine that might help figure out what’s going on.

-Toshio