is anything we can do? by changing to paramiko etc? our hosting team not 
allowing sudo on shells. This is limiting our ability to execute sudo 
commands. 

Srinivas Kotaru



On Tuesday, 15 September 2015 07:25:38 UTC-7, Brian Coca wrote:
>
> no, sadly ansible needs to be able to run a shell as the commands it 
> runs are temporary scripts it copies over and not specific commands 
> that can be listed. 
>
> On Tue, Sep 15, 2015 at 12:43 AM, Srinivas Kotaru <kota...@gmail.com 
> <javascript:>> wrote: 
> > Hi 
> > 
> > 
> > 
> > Am having a issue to use ansible in our environment.  We use sudo to run 
> any 
> > commands. We don't use root to login. In fact even hosting team don't 
> use 
> > root account. Every command ( privileged)  has to be run as sudo. 
> > 
> > 
> > Am getting below error while running command with sudo permission 
> > 
> > 
> > # ansible -m command -a 'ls -l /root' all -i ~/remote/idev-lae-alln.txt 
> -s 
> > -K 
> > 
> > SUDO password: 
> > 
> > ******** | FAILED >> { 
> > 
> >     "failed": true, 
> > 
> >     "msg": "\r\nSorry, user skotaru is not allowed to execute '/bin/sh 
> -c 
> > echo BECOME-SUCCESS-slpnqacunsytplnjohmwkjegpwaqrrej; LANG=en_US.UTF-8 
> > LC_CTYPE=en_US.UTF-8 /usr/bin/python 
> > 
> /users/skotaru/.ansible/tmp/ansible-tmp-1442043902.14-245070656172900/command;
>  
>
> > rm -rf 
> > /users/skotaru/.ansible/tmp/ansible-tmp-1442043902.14-245070656172900/ 
> >>/dev/null 2>&1' as root on **********.\r\nShared connection to 
> > ************* closed.\r\n", 
> > 
> >     "parsed": false 
> > 
> > } 
> > 
> > 
> > It seems our hosting team disabled using /bin/sh or /bin/bash with sudo 
> . I 
> > am able to issue sudo after logging to server and run any privileged 
> > commands. 
> > 
> > 
> > Do you have any solution ? Without this feature, i won't be able to take 
> > advantage of ansible except running few unprivileged commands. 
> > 
> > 
> > Am able to issue unprivileged commands and running fine with ansible. 
> > 
> > 
> > Srinivas Kotaru 
> > 
> > -- 
> > 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 <javascript:>. 
> > To post to this group, send email to ansible...@googlegroups.com 
> <javascript:>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/827cd904-c88f-4ae5-8a20-49a3c60b3231%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> Brian Coca 
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6e7ccaaa-b61b-4abb-bb7b-6150e918a2b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to