Brian,

I found the solution.

A while back, I installed a new version of Python on my test machine 
(sesincub) for reasons unrelated to ansible. To avoid breaking existing 
Python scripts, I installed the new version under a separate path 
(/usr/local) so it could coexist with the old version. When it came time to 
start testing ansible, I forgot that little detail, so I never told ansible 
which Python to use on the client. Thus, ansible was happily using the old 
v2.3.4 Python, which doesn't work. Once I remembered all this, the fix was 
trivial: edit /etc/ansible/hosts and set the path to the correct, new 
Python interpreter on sesincub:

sesincub.stanford.edu ansible_python_interpreter=/usr/local/bin/python


This immediately fixed the ping test:


sesincub.stanford.edu | success >> {

    "changed": false, 

    "ping": "pong"

}


Your comment referring to basic.py was very helpful; checking the source 
code enabled me to google more effectively, and I quickly found this:


http://stivesso.blogspot.com/2014/08/ansible-hosts-install-alternate.html


which jogged my memory and revealed the simple fix.


Thanks for your help.


-- 

Kai Lanz


On Wednesday, November 19, 2014 3:34:04 PM UTC-8, Brian Coca wrote:
>
> the code comes from:
>
> lib/ansible/module_utils/basic.py
>
> where that ends up depends on your installation method.
>
>
> -- 
> 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 [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/7a2c1e5d-ede8-4f50-ad95-aa1a7f0f1277%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to