Hi,
I'm trying to use the raw module in a plybook in order to install python-simplejson and python-apt modules on my nodes.
I saw that there already is a topic on this
https://github.com/ansible/ansible/issues/4079 but I don't really understand the final point of that.
Here is my playbook:
---
- hosts: preprod_inventory_by_hand
remote_user: root
tasks:
- name: Installs python-simplejson in RAW mode
raw: apt-get -y install python-simplejson
register: apt_messages
- debug: var=apt_messages
Here is how I launch my playbook:
# ansible-playbook raw_install_base_modules.yml --private-key /my/super/ssl/key
And this is what it displays:
PLAY [preprod_inventory_by_hand] **********************************************
GATHERING FACTS ***************************************************************
Enter passphrase for key '/my/super/key':
failed: [10.11.11.11] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1400063672.79-16871822868352/setup", line 98, in <module>
import simplejson as json
ImportError: No module named simplejson
TASK: [Installs python-simplejson in RAW mode] ********************************
FATAL: no hosts matched or all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
10.66.237.161 : ok=0 changed=0 unreachable=0 failed=1Please help :)
Tom