raw module inside playbooks

Hi,
according to module description, raw

Executes a low-down and dirty SSH command, not going through the module subsystem.

Everything looks fine using Ad-Hoc Commands.
But inside playbook

`

you might want to add "gather_facts: False" (between hosts and tasks),
otherwise the setup module tries to run before the play even gets to
the raw module

Hi, Brian.
Thank you for explanation, it works.

Hi,

I have this playbook and getting the same above error

  • raw: /home/rccmadm/AIX_5/nimldr -r -X -D CSCLAB -I 192.168.35.14 -o 48005 -R 10.20.73.128 -U gbevan -S ‘N1ms0ft!’ -l /home/rccmadm/nimldr.log
    when: ansible_os_family == “AIX”

If I say gathering facts is false then the condition is ansible_os_family check is failing .

How to resolve this ?

You'll have to make a choice. either install python on the remote
machine so that fact gathering can work or keep an explicit list of
hosts that you want to run this task on instead of relying on
conditionals that need gathered facts.

The fact gathering scripts are written in python so you can't have
facts without also having a remote python interpreter.

-Toshio