"No module named subprocess" on copy

Hi,

I created a playbook to copy a file to the servers.
I another playbook I fetched the files.
(I just started with Ansible.)

Fetching the file worked well.
Now I changed two files and wanted to copy them back to the two servers, one in test, one in production ("produktion").

But coping back to the production server fails.
I created the action as a one-shot and get the same error:

:/etc/ansible # ansible -i produktion -m copy -a "src=roles/bup/files/proxy.pac/sths052.proxy.pac dest=/www/texte/proxy/internet.pac" sths052.ofd-h.de
sths052.ofd-h.de | FAILED >> {
     "failed": true,
     "msg": "Traceback (most recent call last):\n File \"/home/lotti/.ansible/tmp/ansible-1376046525.25-61012031318607/file\", line 317, in ?\n import subprocess\nImportError: No module named subprocess\n",
     "parsed": false
}

The file exists.
The tasks works (with the test server).
Accessing the production server works too, I fetched the file.

What is the problem here?

Marc

subprocess has been part of Python for a long time, so this is curious.

Ansible requires python 2.4 (and simplejson) or python 2.5+ on remote hosts.

What Python do you have there?

If you need to specify another you can set ansible_python_interpreter as an inventory variable (see docs).

let me know, thanks!

Michael,

Michael DeHaan schrieb (09.08.2013 14:19 Uhr):

subprocess has been part of Python for a long time, so this is curious.

Ansible requires python 2.4 (and simplejson) or python 2.5+ on remote hosts.

What Python do you have there?

If you need to specify another you can set ansible_python_interpreter as an inventory variable (see docs).

Oh dear, these are pretty old SLES 9 server as it turns out.
Python there is 2.3.3. :frowning:

Marc