win_become: Added support to become a service user (#30407)

* win_become: Added support to become a service user

* fixes for linting

* changes to get local and network service working

* fixed linting issues again

* pleasing pepe
This commit is contained in:
Jordan Borean 2017-10-10 10:58:29 +10:00 committed by Matt Davis
parent 4e22677e7d
commit 82fa922491
3 changed files with 744 additions and 542 deletions

View file

@ -590,9 +590,6 @@ class PlayContext(Base):
if not self.become_user:
raise AnsibleError(("The 'runas' become method requires a username "
"(specify with the '--become-user' CLI arg, the 'become_user' keyword, or the 'ansible_become_user' variable)"))
if not self.become_pass:
raise AnsibleError(("The 'runas' become method requires a password "
"(specify with the '-K' CLI arg or the 'ansible_become_password' variable)"))
becomecmd = cmd
elif self.become_method == 'doas':