dzdo: fix password prompt (#59208)
This commit is contained in:
parent
277690bcc6
commit
28259ee247
2 changed files with 5 additions and 3 deletions
2
changelogs/fragments/dzdo_password_prompt.yml
Normal file
2
changelogs/fragments/dzdo_password_prompt.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- dzdo did not work with password authentication
|
|
@ -25,7 +25,7 @@ DOCUMENTATION = """
|
||||||
- name: ANSIBLE_BECOME_USER
|
- name: ANSIBLE_BECOME_USER
|
||||||
- name: ANSIBLE_DZDO_USER
|
- name: ANSIBLE_DZDO_USER
|
||||||
become_exe:
|
become_exe:
|
||||||
description: Sudo executable
|
description: Dzdo executable
|
||||||
default: dzdo
|
default: dzdo
|
||||||
ini:
|
ini:
|
||||||
- section: privilege_escalation
|
- section: privilege_escalation
|
||||||
|
@ -87,8 +87,8 @@ class BecomeModule(BecomeBase):
|
||||||
|
|
||||||
flags = self.get_option('become_flags') or ''
|
flags = self.get_option('become_flags') or ''
|
||||||
if self.get_option('become_pass'):
|
if self.get_option('become_pass'):
|
||||||
self._prompt = '[dzdo via ansible, key=%s] password:' % self._id
|
self.prompt = '[dzdo via ansible, key=%s] password:' % self._id
|
||||||
flags = '%s -p "%s"' % (flags.replace('-n', ''), self._prompt)
|
flags = '%s -p "%s"' % (flags.replace('-n', ''), self.prompt)
|
||||||
|
|
||||||
user = self.get_option('become_user') or ''
|
user = self.get_option('become_user') or ''
|
||||||
if user:
|
if user:
|
||||||
|
|
Loading…
Add table
Reference in a new issue