Run Powershell modules on windows container via docker connection (#67832)
* Run modules on windows container This provides an ability to run Powershell modules on windows container via docker connection. Otherwise, Ansible tries to run python modules on windows containers and fails. * Removing whitespace in the blank lines * Adding a changelog fragment
This commit is contained in:
parent
09fb563317
commit
e0eee3c37e
2 changed files with 6 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- docker connection plugin - run Powershell modules on Windows containers.
|
|
@ -76,6 +76,10 @@ class Connection(ConnectionBase):
|
|||
# configured to be connected to by root and they are not running as
|
||||
# root.
|
||||
|
||||
# Windows uses Powershell modules
|
||||
if getattr(self._shell, "_IS_WINDOWS", False):
|
||||
self.module_implementation_preferences = ('.ps1', '.exe', '')
|
||||
|
||||
if 'docker_command' in kwargs:
|
||||
self.docker_cmd = kwargs['docker_command']
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue