Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The most important (in my opinion) difference between the raw module and command and shell is that raw does not require python on servers. Well, except of course the server from which you launch playbooks. I was just using raw to solve the problem of installing python 2.7 on Solaris. Sobsno the problem of "bootstrapping" - how to use a butt that needs a python to install a python xD
raw differs from command and shell in that it doesn't do any extra processing of command execution. These additional processing are present in almost every Ansible module. The raw module sends the command as it is in its "raw" form without checks.
The command and shell modules differ in that in the command module, the command is executed without going through the /bin/sh shell. Therefore, variables defined in the shell and redirect pipelines will not work. The shell module executes commands through the default shell /bin/sh. Therefore, shell variables and redirects will be available there.
bash module is not in the documentation and I have never seen it used.
All other descriptions can be read on the off site
docs.ansible.com/ansible/command_module.html
docs.ansible.com/ansible/shell_module.html
docs.ansible.com/ansible/raw_module.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question