Greetings,
I am to connect few hosts but on few hosts i am get the following error
bash-3.2# ansible app_servers -m shell -a “sudo uptime” -u user2 --ask-pass -k -K --sudo
SSH password:
SUDO password[defaults to SSH password]:
host1.example.com | FAILED >> {
“failed”: true,
“msg”: “\r\nSorry, user user2 is not allowed to execute ‘/bin/sh -c echo BECOME-SUCCESS-drfmorbvjwjghwkuetggsuofxdhdgcjo; LANG=C LC_CTYPE=C /usr/bin/python /tmp/.ansible-user2/tmp/ansible-tmp-1455598070.31-118593960300261/command; rm -rf /tmp/.ansible-user2/tmp/ansible-tmp-1455598070.31-118593960300261/ >/dev/null 2>&1’ as root on host1.\r\n”,
“parsed”: false
}
I can able to ssh the servers with no issues .