diff --git a/lib/ansible/modules/commands/shell.py b/lib/ansible/modules/commands/shell.py index 96bbae5e296..ca17ddda775 100644 --- a/lib/ansible/modules/commands/shell.py +++ b/lib/ansible/modules/commands/shell.py @@ -68,11 +68,11 @@ notes: playbooks will follow the trend of using M(command) unless M(shell) is explicitly required. When running ad-hoc commands, use your best 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. requirements: [ ] -author: +author: - Ansible Core Team - Michael DeHaan ''' @@ -83,7 +83,9 @@ EXAMPLES = ''' - shell: somescript.sh >> somelog.txt # 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 # will change the working directory to somedir/ and will only run when @@ -146,4 +148,4 @@ stdout_lines: returned: always type: list of strings sample: [u'Clustering node rabbit@slave1 with rabbit@master ...'] -''' \ No newline at end of file +'''