Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-06-03 Thread Aneesh Joseph
Thank you Benno and Brian, that worked perfectly :-) - Aneesh On Thursday, June 4, 2015 at 11:02:29 AM UTC+5:30, benno joy wrote: > > ohh sorry yes, the variable i mentioned is used to change the 'sudo' > binary. > > > - Benno > > > On Thu, Jun 4, 2015 at 10:46 AM, Aneesh Joseph > wrote: > >>

Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-06-03 Thread benno joy
ohh sorry yes, the variable i mentioned is used to change the 'sudo' binary. - Benno On Thu, Jun 4, 2015 at 10:46 AM, Aneesh Joseph wrote: > Thanks Benno, > I hope you meant setting '*executable = /bin/bash*' in ansible.cfg? > > - Aneesh > > On Thursday, June 4, 2015 at 10:38:22 AM UTC+5:30,

Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-06-03 Thread Aneesh Joseph
Thanks Benno, I hope you meant setting '*executable = /bin/bash*' in ansible.cfg? - Aneesh On Thursday, June 4, 2015 at 10:38:22 AM UTC+5:30, benno joy wrote: > > > > try setting 'sudo_exe=/bin/bash in ansible.cfg or export > ANSIBLE_SUDO_EXE=/bin/bash > in your cli and then running the playboo

Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-06-03 Thread benno joy
try setting 'sudo_exe=/bin/bash in ansible.cfg or export ANSIBLE_SUDO_EXE=/bin/bash in your cli and then running the playbook, usually /bin/sh is link to /bin/bash in centos/rhel systems. - Benno -- You received this message because you are subscribed to the Google Groups "Ansible Project" gro

Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-06-03 Thread Aneesh Joseph
Thanks for the very quick response Brian. I see that it's trying to execute sudo -k && sudo -H -S -p "[sudo via ansible, key=abcdefghijk] password: " *-u root /bin/sh* -c '"'"'echo BECOME-SUCCESS-abcdefghijk; LANG=C LC_CTYPE=C /usr/bin/python /home/aneesh/.ansible/tmp/ansible-tmp-1433392081.2-

Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-06-03 Thread Brian Coca
use - to show the exact things being run, the message you are seeing implies you need to provide a sudo password On Wed, Jun 3, 2015 at 10:27 PM, Aneesh Joseph wrote: > Thanks Brian :) > I do have access to execute certain sudo commands without chaining privilege > escalation methods. > > sud

Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-06-03 Thread Aneesh Joseph
Thanks Brian :) I do have access to execute certain sudo commands without chaining privilege escalation methods. sudo -l gives me a list of what I can execute. But Ansible seems to be executing something other than this. For example I get the below error while running a playbook which has 'sudo

Re: [ansible-project] Making use of Ansible Privilege Escalation

2015-05-28 Thread Brian Coca
ansible cannot chain privilege escalation methods, it can either use pbrun or su, but not both. pbrun should be able to allow you to execute all commands as a user w/o needing su. On Wed, May 27, 2015 at 1:19 PM, Aneesh Joseph wrote: > I'm trying to find the equivalent of > > > ansible dev -a "/o

[ansible-project] Making use of Ansible Privilege Escalation

2015-05-28 Thread Aneesh Joseph
I'm trying to find the equivalent of ansible dev -a "/opt/pb/bin/pbrun su tomcat -c echo hi" -u aneesh (this works) I tried with ansible dev -a "echo hi" -u aneesh --become-user=tomcat--become-method=pbrun -b but it gave me the response "failed": true, "msg": "/bin/sh: pbrun: