From ff06320b03f304361d9702b737fa48f3e7253d2b Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Sat, 22 Sep 2018 01:49:17 +0200 Subject: [PATCH] Add less judgmental hint to use script + template --- lib/ansible/modules/commands/shell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/commands/shell.py b/lib/ansible/modules/commands/shell.py index b211eb7efb5..471bc496552 100644 --- a/lib/ansible/modules/commands/shell.py +++ b/lib/ansible/modules/commands/shell.py @@ -72,6 +72,8 @@ notes: are not supplied, the task will be skipped. - 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. + - An alternative to using inline shell scripts with this module is to use + the M(script) module possibly together with the M(template) module. - For Windows targets, use the M(win_shell) module instead. author: - Ansible Core Team