mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 23:21:22 -07:00
Merge branch 'playbook_ssh_ask_pass' of git://github.com/clatour/ansible into devel
Conflicts: examples/ansible.cfg + doc tweak
This commit is contained in:
commit
6f938c9f4c
5 changed files with 12 additions and 5 deletions
|
@ -75,6 +75,7 @@ class Cli(object):
|
|||
|
||||
sshpass = None
|
||||
sudopass = None
|
||||
options.ask_pass = options.ask_pass or C.DEFAULT_ASK_PASS
|
||||
if options.ask_pass:
|
||||
sshpass = getpass.getpass(prompt="SSH password: ")
|
||||
options.ask_sudo_pass= options.ask_sudo_pass or C.DEFAULT_ASK_SUDO_PASS
|
||||
|
|
|
@ -70,6 +70,7 @@ def main(args):
|
|||
sshpass = None
|
||||
sudopass = None
|
||||
if not options.listhosts:
|
||||
options.ask_pass = options.ask_pass or C.DEFAULT_ASK_PASS
|
||||
if options.ask_pass:
|
||||
sshpass = getpass.getpass(prompt="SSH password: ")
|
||||
options.ask_sudo_pass = options.ask_sudo_pass or C.DEFAULT_ASK_SUDO_PASS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue