Put shell snippets into task.shell.cmd
Putting them directly into shell: breaks here docs. We can also use the same dict for setting executable. Change-Id: I050a17085f342e5765215bcde140649a9c740773
This commit is contained in:
parent
8f68fcc3ae
commit
2bd6b001e8
|
@ -657,9 +657,11 @@ class Job:
|
|||
def _emitShellTask(self, data, syntax_check):
|
||||
shell, data = deal_with_shebang(data)
|
||||
task = collections.OrderedDict()
|
||||
task['shell'] = data
|
||||
# Putting the data directly into shell: causes here docs to break.
|
||||
task['shell'] = collections.OrderedDict()
|
||||
task['shell']['cmd'] = data
|
||||
if shell:
|
||||
task['args'] = dict(executable=shell)
|
||||
task['shell']['executable'] = shell
|
||||
|
||||
if syntax_check:
|
||||
# Emit a test playbook with this shell task in it then run
|
||||
|
|
Loading…
Reference in New Issue