diff options
author | Andy R <nobody@none.com> | 2013-08-07 08:05:59 -0400 |
---|---|---|
committer | Andre Rauh <andre.rauh@gmail.com> | 2013-08-07 08:05:59 -0400 |
commit | 5a47953e7d52e6cbc0b173b393cb64f6e22f14bb (patch) | |
tree | cc12868392713b29d179d3779e230ab6b5fde384 /bin/ansible-playbook | |
parent | 0089ecfa7e9822a55c80ed422adfc181bcf527ca (diff) | |
download | ansible-5a47953e7d52e6cbc0b173b393cb64f6e22f14bb.tar.gz |
Never ask for SSH password when using local connection.
With the command line option "-c local", ansible and ansible-playbook
should never ask for a SSH password even if this is set in the config.
Fixes #3720
Diffstat (limited to 'bin/ansible-playbook')
-rwxr-xr-x | bin/ansible-playbook | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/ansible-playbook b/bin/ansible-playbook index 0f8f2b29ae..59b6afa078 100755 --- a/bin/ansible-playbook +++ b/bin/ansible-playbook @@ -91,6 +91,9 @@ def main(args): sudopass = None if not options.listhosts and not options.syntax and not options.listtasks: options.ask_pass = options.ask_pass or C.DEFAULT_ASK_PASS + # Never ask for an SSH password when we run with local connection + if options.connection == "local": + options.ask_pass = False options.ask_sudo_pass = options.ask_sudo_pass or C.DEFAULT_ASK_SUDO_PASS ( sshpass, sudopass ) = utils.ask_passwords(ask_pass=options.ask_pass, ask_sudo_pass=options.ask_sudo_pass) options.sudo_user = options.sudo_user or C.DEFAULT_SUDO_USER |