From 8f2569892521607c10b0570e98186865a0ce0ebe Mon Sep 17 00:00:00 2001 From: Rik Date: Tue, 24 Jun 2014 13:45:49 +0200 Subject: [PATCH] Added examples to the command module --- commands/command | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/commands/command b/commands/command index f1a48922122..342e3db4938 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():