From e9a4526251d24370ffcd1761cb62460c4f548676 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 28 Mar 2016 08:02:27 -0700 Subject: [PATCH] allow bypassing executable setting if you set executable to an empty string this avoids passing one to the command constructor fixes #14813 --- lib/ansible/plugins/action/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index 2bb5b7546e8..fdff04b400f 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -621,7 +621,8 @@ class ActionBase(with_metaclass(ABCMeta, object)): if self._connection.allow_executable: if executable is None: executable = self._play_context.executable - cmd = executable + ' -c ' + pipes.quote(cmd) + if executable: + cmd = executable + ' -c ' + pipes.quote(cmd) display.debug("_low_level_execute_command(): executing: %s" % (cmd,)) rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)