summaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
authorRik <gitaarik@gmail.com>2014-06-24 13:45:49 +0200
committerRik <gitaarik@gmail.com>2014-06-24 13:47:23 +0200
commit8f2569892521607c10b0570e98186865a0ce0ebe (patch)
tree05a0a0a3987b1d5477c8f4a45e51312a366dcb3d /commands
parent0b8aec95475fa1d966eb3fe19aab0f84a5bd16b8 (diff)
downloadansible-modules-core-8f2569892521607c10b0570e98186865a0ce0ebe.tar.gz
Added examples to the command module
Diffstat (limited to 'commands')
-rw-r--r--commands/command12
1 files changed, 10 insertions, 2 deletions
diff --git a/commands/command b/commands/command
index f1a48922..342e3db4 100644
--- a/commands/command
+++ b/commands/command
@@ -77,11 +77,19 @@ author: Michael DeHaan
'''
EXAMPLES = '''
-# Example from Ansible Playbooks
+# Example from Ansible Playbooks.
- command: /sbin/shutdown -t now
-# Run the command if the specified file does not exist
+# Run the command if the specified file does not exist.
- command: /usr/bin/make_database.sh arg1 arg2 creates=/path/to/database
+
+# 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
+# /path/to/database doesn't exist.
+- command: /usr/bin/make_database.sh arg1 arg2
+ args:
+ chdir: somedir/
+ creates: /path/to/database
'''
def main():