summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2017-12-06 08:38:48 -0800
committerGitHub <noreply@github.com>2017-12-06 08:38:48 -0800
commitaffccead97871fe461368523483792e7f2d9a2d9 (patch)
tree0e3c78be1ef3dff4292c387905183143767e6f5f
parent395566746efbfbe31505c83df39e6e85f3292b00 (diff)
downloadansible-abadger-command-module.tar.gz
Fix Command module documentationabadger-command-module
The command module docs were unclear. They talked about ignoring the user's environment which lead people to believe the user's environment variables were not used. In actual fact, the user's environment variables are used. They just are not expanded in the command.
-rw-r--r--lib/ansible/modules/commands/command.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/modules/commands/command.py b/lib/ansible/modules/commands/command.py
index 863822b617..0ab85ff128 100644
--- a/lib/ansible/modules/commands/command.py
+++ b/lib/ansible/modules/commands/command.py
@@ -57,7 +57,8 @@ options:
default: null
notes:
- If you want to run a command through the shell (say you are using C(<), C(>), C(|), etc), you actually want the M(shell) module instead.
- The C(command) module is much more secure as it's not affected by the user's environment.
+ Parsing shell metacharacters can lead to unexpected commands being executed if quoting is not done correctly so it is more secure to
+ use the C(command) module when possible.
- " C(creates), C(removes), and C(chdir) can be specified after the command.
For instance, if you only want to run a command if a certain file does not exist, use this."
- The C(executable) parameter is removed since version 2.4. If you have a need for this parameter, use the M(shell) module instead.