As indicated, this isn't about setting the path, this is about configuring
sudo in ansible.cfg to include the full path to the sudo executable.

This is the way this will need to be done as this all happens before
executing the module, hence using Ansible to set a path is not possible.




On Fri, Nov 22, 2013 at 8:44 PM, Melissa Tan <m...@white-box.co> wrote:

> On Friday, 22 November 2013 12:57:48 UTC-8, Michael DeHaan wrote:
>>
>> "But target hosts are Solaris 10 on x86 with Python 2.6"
>>
>> Sounds like that's it, you just didn't have sudo in path.
>>
>>
> Yes, but the problem is that I can't set the PATH to what I need it to
> /usr/local/bin/sudo .  I had it set in .bash_profile (interactive) as well
> as .bashrc (non-interactive) and it still wasn't getting the PATH set
> properly.  It's got way more than just /usr/bin:/bin that's it is showing
> below.
>
> webadm@bchopsadmp1$ ansible -i hosts/haqa1 proxy -a 'env' -u ldapadm
> xqa1prxy2 | success | rc=0 >>
> LANG=C
> HOME=/export/home/ldapadm
> LOGNAME=ldapadm
> MAIL=/var/mail//ldapadm
> PATH=/usr/bin:/bin
> PWD=/export/home/ldapadm
> SHELL=/bin/bash
> SHLVL=1
> SSH_CLIENT=142.52.244.208 50038 22
> SSH_CONNECTION=142.52.244.208 50038 142.52.192.197 22
> TZ=US/Pacific
> USER=ldapadm
> _=/bin/sh
>
> xqa1prxy1 | success | rc=0 >>
> LANG=C
> HOME=/export/home/ldapadm
> LOGNAME=ldapadm
> MAIL=/var/mail//ldapadm
> PATH=/usr/bin:/bin
> PWD=/export/home/ldapadm
> SHELL=/bin/bash
> SHLVL=1
> SSH_CLIENT=142.52.244.208 43746 22
> SSH_CONNECTION=142.52.244.208 43746 142.52.192.192 22
> TZ=US/Pacific
> USER=ldapadm
> _=/bin/sh
>
>  --
> 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.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Michael DeHaan <mich...@ansibleworks.com>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to