mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Change examples syntax on shell module
This commit is contained in:
@@ -68,11 +68,11 @@ notes:
|
|||||||
playbooks will follow the trend of using M(command) unless M(shell) is
|
playbooks will follow the trend of using M(command) unless M(shell) is
|
||||||
explicitly required. When running ad-hoc commands, use your best
|
explicitly required. When running ad-hoc commands, use your best
|
||||||
judgement.
|
judgement.
|
||||||
- To sanitize any variables passed to the shell module, you should use
|
- To sanitize any variables passed to the shell module, you should use
|
||||||
"{{ var | quote }}" instead of just "{{ var }}" to make sure they don't include evil things like semicolons.
|
"{{ var | quote }}" instead of just "{{ var }}" to make sure they don't include evil things like semicolons.
|
||||||
|
|
||||||
requirements: [ ]
|
requirements: [ ]
|
||||||
author:
|
author:
|
||||||
- Ansible Core Team
|
- Ansible Core Team
|
||||||
- Michael DeHaan
|
- Michael DeHaan
|
||||||
'''
|
'''
|
||||||
@@ -83,7 +83,9 @@ EXAMPLES = '''
|
|||||||
- shell: somescript.sh >> somelog.txt
|
- shell: somescript.sh >> somelog.txt
|
||||||
|
|
||||||
# Change the working directory to somedir/ before executing the command.
|
# Change the working directory to somedir/ before executing the command.
|
||||||
- shell: somescript.sh >> somelog.txt chdir=somedir/
|
- shell: somescript.sh >> somelog.txt
|
||||||
|
args:
|
||||||
|
chdir: somedir/
|
||||||
|
|
||||||
# You can also use the 'args' form to provide the options. This command
|
# 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
|
# will change the working directory to somedir/ and will only run when
|
||||||
@@ -146,4 +148,4 @@ stdout_lines:
|
|||||||
returned: always
|
returned: always
|
||||||
type: list of strings
|
type: list of strings
|
||||||
sample: [u'Clustering node rabbit@slave1 with rabbit@master ...']
|
sample: [u'Clustering node rabbit@slave1 with rabbit@master ...']
|
||||||
'''
|
'''
|
||||||
|
|||||||
Reference in New Issue
Block a user