issue #291: restore behaviour of invoking binaries via /bin/sh
This ensures failed task output matches vanilla Ansible exactly (as it did before starting #291).
This commit is contained in:
parent
c5ea7c45a1
commit
de0d526487
|
@ -398,7 +398,17 @@ class ProgramRunner(Runner):
|
|||
"""
|
||||
Return the final argument vector used to execute the program.
|
||||
"""
|
||||
return [self.program_fp.name] + self._get_program_args()
|
||||
return [
|
||||
self.args['_ansible_shell_executable'],
|
||||
'-c',
|
||||
self._get_shell_fragment(),
|
||||
]
|
||||
|
||||
def _get_shell_fragment(self):
|
||||
return "%s %s" % (
|
||||
shlex_quote(self.program_fp.name),
|
||||
' '.join(map(shlex_quote, self._get_program_args())),
|
||||
)
|
||||
|
||||
def _run(self):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue