<p>If you only want to run a command if a certain file does not exist, you can do the
following:</p>
<p>creates and chdir can be specified after the command. For instance, if you only want to run a command if a certain file does not exist, you can do the following:</p>
The given command will be executed on all selected nodes. It will not
be processed through the shell, so variables like "$HOME" and
operations like "<", ">", "|", and "&" will not work. As such, all
paths to commands must be fully qualified.
This module does not support change hooks and returns the return code
from the program as well as timing information about how long the
command was running.
NOTE:: If you want to run a command through the shell (say you are using
'<', '>', '|', etc), you actually want the 'shell' module instead.
The 'command' module is much more secure as it's not affected by the user's environment.
Example action from Ansible :doc:`playbooks`::
command /sbin/shutdown -t now
If you only want to run a command if a certain file does not exist, you can do the
following::
creates and chdir can be specified after the command. For instance, if you only want to run a command if a certain file does not exist, you can do the following::