mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
dzdo prompt fix
fixed tests dzdo has 2 paths now, with and w/o password fixes #17838
This commit is contained in:
@@ -562,8 +562,11 @@ class PlayContext(Base):
|
||||
elif self.become_method == 'dzdo':
|
||||
|
||||
exe = self.become_exe or 'dzdo'
|
||||
|
||||
becomecmd = '%s -u %s %s' % (exe, self.become_user, command)
|
||||
if self.become_pass:
|
||||
prompt = '[dzdo via ansible, key=%s] password: ' % randbits
|
||||
becomecmd = '%s -p %s -u %s %s' % (exe, pipes.quote(prompt), self.become_user, command)
|
||||
else:
|
||||
becomecmd = '%s -u %s %s' % (exe, self.become_user, command)
|
||||
|
||||
else:
|
||||
raise AnsibleError("Privilege escalation method not found: %s" % self.become_method)
|
||||
|
||||
Reference in New Issue
Block a user