By default, the setup module is automatically run, which relies on json... Add 'gather_facts: False' in the play header here to avoid that.
On 14 May 2014 12:48, grobs <[email protected]> wrote: > 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=1 > > Please help :) > Tom > > > > -- > 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/7b14b809-1f2b-4bde-8465-b019d73c5f92%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/7b14b809-1f2b-4bde-8465-b019d73c5f92%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAEhzMJCu9MAvW4QHvFHW3nB_S65d8%2Bibv5SJUZVwhaN0AV0jRA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
