I got exactly the same use case. If there's a smart solution I'm 
interested, otherwise using a "redhat5" group_vars with var accelerate: 
false allowed me to make an exception over old OSs.

Le samedi 9 novembre 2013 03:20:20 UTC+1, Kevin Sage a écrit :
>
> This may be a stupid question, but I want to be sure I'm not missing 
> something...
>
> Accelerated mode seems to require some Python 2.5+ syntax, and per 
> commit a66cfed on the devel branch, the docs have been updated to state 
> that it requires 2.5+ and python-keyczar.  So on CentOS 5, which of course 
> comes with Python 2.4 in /usr/bin/python, I wrote a bootstrap playbook that 
> would run using /usr/bin/python, install python 2.6 via yum (as 
> /usr/bin/python2.6), install a custom-compiled libgmp (since the one that 
> comes with CentOS 5 is too old for keyczar), and then install keyczar. 
>  That part all works great for me.
>
> My plan was then to set ansible_python_interpreter to /usr/bin/python2.6 
> on the CentOS 5 hosts, so they could use my custom setup for Accelerated 
> mode.  However, that fails because /usr/bin/python2.6 doesn't have the 
> "yum" module - and probably is missing other things - which don't seem to 
> be installable in any method I could figure out.  And I stumbled across this 
> old thread 
> <https://groups.google.com/forum/#!msg/ansible-project/yNWKzV5F-QU/_way-1qMct0J>
>  where 
> Michael said using a python other than the OS's default is not a good idea.
>
> So my question is simple: if I want to use Accelerated Mode on a client 
> that only has Python 2.4 as it's default, like CentOS 5, am I just out of 
> luck? 
>
> A follow-up question: If the answer to the above is "yes, you can't use 
> accel mode on CentOS 5", then is it possible to turn on accelerated mode 
> for specific hosts/host groups via the "host_vars" and "group_vars" 
> variable files, or can it only be done in the play definition?  I'd love to 
> be able to enable it for newer systems while leaving it disabled for the 
> older ones, without needing to muck around with my existing host groups...
>
> Thanks!
> Kevin
>
>

-- 
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/479425b5-80bb-4264-ab55-de255d87420d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to