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 On Monday, January 4, 2016, Ravi Kavali <[email protected]> wrote: > 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 > > > > > -- > 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 [email protected] > <javascript:_e(%7B%7D,'cvml','ansible-project%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/3bee4e7b-5b91-48ba-84e1-0e07dde6b376%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/3bee4e7b-5b91-48ba-84e1-0e07dde6b376%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Matt Martz @sivel sivel.net -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v-EPHj_4YCoBv81K4JXAaZaZ67H9vx8y-Nyo1k8ZV7f2A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
