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:
Ruheena Ansari 2020-02-28 17:05:53 -05:00 committed by GitHub
parent 09fb563317
commit e0eee3c37e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- docker connection plugin - run Powershell modules on Windows containers.

View file

@ -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: