This looks like you might have ansible_python_interpreterer set to /usr/bin/python2 somewhere else in the system, or else, the maintainer of your package applied a nasty patch that hardcoded /usr/bin/python2 at the top of the file in the source to the ping module.
They should not do this because you can set ansible_python_interpreter on a per host basis, and this would mean that Arch installs could only manage Arch, which would be very wrong. Can you look at the source in library/system/ping and tell me what the top (shebang) line is? On Tue, Mar 4, 2014 at 3:10 AM, Marco Corte <[email protected]> wrote: > Hi all. > > I am very new to Ansible and installed version 1.5 yesterday on Arch Linux > using the package provided by the distribution. > > I started trying to connect to a solaris node that has /usr/bin/python, I > tried to set a variable in the "hosts" inventory: > > goast06 ansible_python_interpreter=/usr/bin/python > > But launching a simple ping, this setting seems to be ignored (the ping is > successful since I made a symlink python2 -> python) > > # ansible -k -vvvv goast06 -m ping > SSH password: > <goast06> ESTABLISH CONNECTION FOR USER: root > <goast06> REMOTE_MODULE ping > <goast06> EXEC ['sshpass', '-d6', 'ssh', '-C', '-tt', '-vvv', '-o', > 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', > 'ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', > '-o', 'GSSAPIAuthentication=no', '-o', 'PubkeyAuthentication=no', '-o', > 'ConnectTimeout=10', 'goast06', "/bin/sh -c 'mkdir -p > $HOME/.ansible/tmp/ansible-tmp-1393920144.19-66127382946581 && echo > $HOME/.ansible/tmp/ansible-tmp-1393920144.19-66127382946581'"] > <goast06> PUT /tmp/tmpC2ljll TO > //.ansible/tmp/ansible-tmp-1393920144.19-66127382946581/ping > <goast06> EXEC ['sshpass', '-d6', 'ssh', '-C', '-tt', '-vvv', '-o', > 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', > 'ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', > '-o', 'GSSAPIAuthentication=no', '-o', 'PubkeyAuthentication=no', '-o', > 'ConnectTimeout=10', 'goast06', "/bin/sh -c '/usr/bin/python2 > //.ansible/tmp/ansible-tmp-1393920144.19-66127382946581/ping; rm -rf > //.ansible/tmp/ansible-tmp-1393920144.19-66127382946581/ >/dev/null 2>&1'" > ] > goast06 | success >> { > "changed": false, > "ping": "pong" > } > > I never tried the feature before, so I am not sure where to start for a > debug. > What am I doing wrong? Could this be an issue in the Arch Linux package? > > Thank you > > -- > 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/4fc70b2e-b1b4-4528-8a1f-9a3861d5217e%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/4fc70b2e-b1b4-4528-8a1f-9a3861d5217e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/groups/opt_out. > -- 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/CAEVJ8QPPD449QMyzWhA24BgpKMwVET4wU9%2BX6PJxbTKWvJOckQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
