From 61f2ae1c26cc5571fe7520b2f01fd851c5f09c9d Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Fri, 21 Feb 2020 19:23:53 +1000 Subject: [PATCH] Fix runas as collection become plugin (#67638) --- lib/ansible/executor/powershell/module_manifest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/executor/powershell/module_manifest.py b/lib/ansible/executor/powershell/module_manifest.py index ce705db560e..3d3f3dfee22 100644 --- a/lib/ansible/executor/powershell/module_manifest.py +++ b/lib/ansible/executor/powershell/module_manifest.py @@ -297,7 +297,7 @@ def _create_powershell_wrapper(b_module_data, module_path, module_args, exec_manifest["async_timeout_sec"] = async_timeout exec_manifest["async_startup_timeout"] = C.config.get_config_value("WIN_ASYNC_STARTUP_TIMEOUT", variables=task_vars) - if become and become_method == 'runas': + if become and become_method.split('.')[-1] == 'runas': # runas and namespace.collection.runas finder.scan_exec_script('exec_wrapper') finder.scan_exec_script('become_wrapper')