accelerate mode and custom python interpreter (virtualenv)

Hi guys,

unfortunately I’m on REHL6 without the option to install python packages for the standard python installation. Thus I’m using Ansible from an virtualenv on the managing node. That works fine, except that now I’m running into performance issues.

The virtualenv sits on a nfs share which is mounted to all nodes. Thus it is available on all nodes.

python-keyczar is installed in the virtualenv and seems to work. At least the following command runs from within the virtualenv

keyczart create --location=~/temp --purpose=crypt

Now I’ve created a wrapper script for the custom python interpreter (/home/test/PythonVirtualEnv/pyenv
):

`
#!/bin/tcsh

source /home/ft2vwaa/PythonVirtualEnv/AnsibleEnv2/bin/activate.csh

python $argv[1]

`

and I can use it as custom interpreter, e.g.:

`

  • hosts: logstash
    name: Source virtual env
    remote_user: “{{ test_remote_user }}”
    vars:
    ansible_python_interpreter: /home/test/PythonVirtualEnv/pyenv
    tasks:
  • name: check
    shell: echo $VIRTUAL_ENV
    register: out
  • debug: var=out.stdout_lines
    `

This prints out the virtualenv as expected. So it is actually loaded.

But adding the accelerate mode directive results in an error.

`

  • hosts: logstash
    name: Source virtual env
    remote_user: “{{ ipf_remote_user }}”
    accelerate: true
    vars:
    ansible_python_interpreter: /home/ft2vwaa/PythonVirtualEnv/pyenv
    tasks:
  • name: check
    shell: echo $VIRTUAL_ENV
    register: out
  • debug: var=out.stdout_lines
    `

`

GATHERING FACTS ***************************************************************
fatal: [server_01] => Failed to launch the accelerated daemon on server_01 (reason: keyczar is not installed (on the remote side))
fatal: [server_02] => Failed to launch the accelerated daemon on server_02 (reason: keyczar is not installed (on the remote side))

`

Any ideas or suggestions are highly welcome.

Cheers,

Jan

I haven't looked at the code yet to see if there's something about
accelerate that may interfere with ansible_python_interpreter but I
have a feeling that you might not get any speedup even if you get it
working. accelerate was written before openssh's controlpersist was
widespread. Now that even RHEL6 has a controlpersist capable openssh,
there's not much reason to use it for most platforms.

-Toshio