make become prompt method agnostic (#33789)

fixes #33747
This commit is contained in:
Brian Coca 2017-12-13 17:57:06 -05:00 committed by Adrian Likins
parent ad94a3a6a2
commit afa82be019

View file

@ -323,11 +323,11 @@ class CLI(with_metaclass(ABCMeta, object)):
try:
if op.ask_pass:
sshpass = getpass.getpass(prompt="SSH password: ")
become_prompt = "%s password[defaults to SSH password]: " % op.become_method.upper()
become_prompt = "BECOME password[defaults to SSH password]: "
if sshpass:
sshpass = to_bytes(sshpass, errors='strict', nonstring='simplerepr')
else:
become_prompt = "%s password: " % op.become_method.upper()
become_prompt = "BECOME password: "
if op.become_ask_pass:
becomepass = getpass.getpass(prompt=become_prompt)