Complete rewrite of Windows exec wrapper (#21510)

* supports pipelining for faster execution
* supports become (runas), creates interactive subsession under WinRM batch logon
* supports usage of arbitrary module_utils files
* modular exec wrapper payload supports easier extension
* integrates async wrapper behavior for pipelined/become'd async
* module_utils are loaded as true Powershell modules, no more runtime modifications to module code
This commit is contained in:
Matt Davis 2017-02-17 00:09:56 -08:00 committed by GitHub
commit 8527013fbe
17 changed files with 1104 additions and 148 deletions

View file

@ -550,10 +550,8 @@ class PlayContext(Base):
becomecmd = '%s %s "%s"' % (exe, flags, success_cmd)
elif self.become_method == 'runas':
raise AnsibleError("'runas' is not yet implemented")
#FIXME: figure out prompt
# this is not for use with winrm plugin but if they ever get ssh native on windoez
becomecmd = '%s %s /user:%s "%s"' % (exe, flags, self.become_user, success_cmd)
# become is handled inside the WinRM connection plugin
becomecmd = cmd
elif self.become_method == 'doas':