From 9693a552864e2b3cd25f5e999bcfd461913b02ff Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Sun, 6 Jan 2019 15:44:54 -0500 Subject: [PATCH] (action/script) Fix windows absolute path detection when executing powershell script (#50365) --- lib/ansible/plugins/action/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/action/script.py b/lib/ansible/plugins/action/script.py index 5b528bf10d2..16b9fdf65f5 100644 --- a/lib/ansible/plugins/action/script.py +++ b/lib/ansible/plugins/action/script.py @@ -66,7 +66,7 @@ class ActionModule(ActionBase): if chdir: # Powershell is the only Windows-path aware shell if self._connection._shell.SHELL_FAMILY == 'powershell' and \ - not self.windows_absolute_path_detection.matches(chdir): + not self.windows_absolute_path_detection.match(chdir): raise AnsibleActionFail('chdir %s must be an absolute path for a Windows remote node' % chdir) # Every other shell is unix-path-aware. if self._connection._shell.SHELL_FAMILY != 'powershell' and not chdir.startswith('/'):