mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
runas placeholder
This commit is contained in:
parent
81ee2412a4
commit
f048aca5f6
1 changed files with 8 additions and 0 deletions
|
@ -379,6 +379,14 @@ class PlayContext(Base):
|
||||||
# No user as it uses it's own exec_attr to figure it out
|
# No user as it uses it's own exec_attr to figure it out
|
||||||
becomecmd = '%s %s "%s"' % (exe, flags, success_cmd)
|
becomecmd = '%s %s "%s"' % (exe, flags, success_cmd)
|
||||||
|
|
||||||
|
elif self.become_method == 'runas':
|
||||||
|
raise AnsibleError("'runas' is not yet implemented")
|
||||||
|
#TODO: figure out prompt
|
||||||
|
# this is not for use with winrm plugin but if they ever get ssh native on windoez
|
||||||
|
exe = self.become_exe or 'runas'
|
||||||
|
flags = self.become_flags or ''
|
||||||
|
becomecmd = '%s %s /user:%s "%s"' % (exe, flags, self.become_user, success_cmd)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
raise AnsibleError("Privilege escalation method not found: %s" % self.become_method)
|
raise AnsibleError("Privilege escalation method not found: %s" % self.become_method)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue