On Tuesday, 5 May 2015 01:21:17 UTC+10, Brian Coca wrote:
>
> When you gather facts on the machine, you should be able to see the
> 'PATH' that ansible sees under ansible_env, ansible uses it's own path
> list to find apt and dpkg, but that should not influence the other
> tools, which ansible is not using directly.
>
Thanks for your response. If I understand you correctly, I can also do
this to see what PATH Ansible is using:
$ ansible -m setup XXX
...
XXX | success >> {
"ansible_facts": {
...
"ansible_env": {
...
"PATH": "/usr/local/bin:/usr/bin:/bin:/usr/games",
...
"USERNAME": "root"
},
...
},
"changed": false
}
The USERNAME of "root" tells me that Ansible is correctly sudo-ing before
running the setup, so I'd expect it to be doing the same before apt-ing.
If this is the PATH setting when Ansible runs apt-get though, it's no
surprise to me that it's failing when it tries to hit things in /sbin.
What could be responsible for this discrepancy in the PATHs based on how
the system is being accessed? Is this likely to be a system configuration
issue or an Ansible (v1.9.1) issue?
--
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/52b52b34-e20a-4200-b7a8-ff965585e642%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.