summaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
authorRik <gitaarik@gmail.com>2014-06-24 13:40:19 +0200
committerRik <gitaarik@gmail.com>2014-06-24 13:45:33 +0200
commit0b8aec95475fa1d966eb3fe19aab0f84a5bd16b8 (patch)
tree76860df2f141f108ee6cc7b7e5168fb40eb8b501 /commands
parent6d78d6c6b165244fc91d78d54e1d76690e97e3f1 (diff)
downloadansible-modules-core-0b8aec95475fa1d966eb3fe19aab0f84a5bd16b8.tar.gz
Added examples to the shell module
Diffstat (limited to 'commands')
-rw-r--r--commands/shell13
1 files changed, 12 insertions, 1 deletions
diff --git a/commands/shell b/commands/shell
index 639d4a14..130abc67 100644
--- a/commands/shell
+++ b/commands/shell
@@ -53,6 +53,17 @@ author: Michael DeHaan
EXAMPLES = '''
# Execute the command in remote shell; stdout goes to the specified
-# file on the remote
+# file on the remote.
- shell: somescript.sh >> somelog.txt
+
+# Change the working directory to somedir/ before executing the command.
+- shell: somescript.sh >> somelog.txt chdir=somedir/
+
+# You can also use the 'args' form to provide the options. This command
+# will change the working directory to somedir/ and will only run when
+# somedir/somelog.txt doesn't exist.
+- shell: somescript.sh >> somelog.txt
+ args:
+ chdir: somedir/
+ creates: somelog.txt
'''