use configured ansible_shell_executable

refine args/shell/executable hanlding
This commit is contained in:
Brian Coca 2017-10-05 11:02:41 -04:00 committed by Brian Coca
parent 48f4643a66
commit f2ade09dce
2 changed files with 29 additions and 22 deletions

View file

@ -607,6 +607,9 @@ class ActionBase(with_metaclass(ABCMeta, object)):
# give the module the socket for persistent connections
module_args['_ansible_socket'] = task_vars.get('ansible_socket')
# make sure all commands use the designated shell executable
module_args['_ansible_shell_executable'] = self._play_context.executable
def _execute_module(self, module_name=None, module_args=None, tmp=None, task_vars=None, persist_files=False, delete_remote_tmp=True, wrap_async=False):
'''
Transfer and run a module along with its arguments.