failed while connecting to remote hosts

20 views
Skip to first unread message

Ravi Kavali

unread,
Jan 4, 2016, 8:56:09 PM1/4/16
to Ansible Project
able to connect few hosts but not all, i get the following error 

hostnamexxx | FAILED >> {"failed": true, "msg": "\r\nSorry, user user123 is not allowed to execute '/bin/sh -c echo BECOME-SUCCESS-ulmhjizflgyappzkndibaykuvymkwnds; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /tmp/ansible-tmp-1451954748.36-250854743528657/command' as appuser on <hostnamexxxxx>.\r\n", "parsed": false}


 


command  used to connect to remote hosts :



$ansible testuat -i dev -u user123 -ks -U appuser -K -m command -a "uptime" -o

SSH password: 

SUDO password[defaults to SSH password]: 


testuat is the inventory file


my requirement 


ssh to---> user123@bastian host ---->ssh user123@acutal host  ---> sudo su - appuser




Thanks in Advance




Matt Martz

unread,
Jan 4, 2016, 9:33:42 PM1/4/16
to ansible...@googlegroups.com
Per that error, user123 is not permitted to execute /bin/sh as appuser via sudo:

Sorry, user user123 is not allowed to execute '/bin/sh...' as appuser on <hostnamexxxxx
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/3bee4e7b-5b91-48ba-84e1-0e07dde6b376%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Reply all
Reply to author
Forward
0 new messages