Added examples to the command module
This commit is contained in:
parent
0b8aec9547
commit
8f25698925
1 changed files with 10 additions and 2 deletions
|
@ -77,11 +77,19 @@ author: Michael DeHaan
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
# Example from Ansible Playbooks
|
# Example from Ansible Playbooks.
|
||||||
- command: /sbin/shutdown -t now
|
- 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
|
- 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():
|
def main():
|
||||||
|
|
Loading…
Reference in a new issue