ansible/ansible — pull request #6846 by kolbyjack (2014-04-03 17:40:48+00:00)
Title: Don't disable GSSAPIAuthentication or PubkeyAuthentication when using --ask-pass

As requested on irc, here's the output of ansible-playbook -vvvv with one echo on a delegate_to host and one on the main host. The password on the delegated host is different from the one I provided on the command line, so it had to use the pubkey, and the main host doesn't have a pubkey on it yet, so it had to use the password.

TASK: [createvm | echo on delegated host] ****************************************
ESTABLISH CONNECTION FOR USER: ansible
REMOTE_MODULE command echo "This is on the delegated host"
EXEC ['sshpass', '-d14', 'ssh', '-C', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ForwardAgent=yes', '-o', 'ControlPath=/home/jon/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'User=ansible', '-o', 'ConnectTimeout=10', u'delegate.example.net', '/bin/sh -c /usr/bin/python']
changed: [main.example.net] => {"changed": true, "cmd": ["echo", "This is on the delegated host"], "delta": "0:00:00.001584", "end": "2014-04-03 13:19:35.184026", "item": "", "rc": 0, "start": "2014-04-03 13:19:35.182442", "stderr": "", "stdout": "This is on the delegated host"}

TASK: [bootstrap | echo on main host] *****************************************
ESTABLISH CONNECTION FOR USER: root
REMOTE_MODULE command echo "This is on the main host"
EXEC ['sshpass', '-d9', 'ssh', '-C', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ForwardAgent=yes', '-o', 'ControlPath=/home/jon/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'User=root', '-o', 'ConnectTimeout=10', u'main.example.net', '/bin/sh -c /usr/bin/python']
changed: [main.example.net] => {"changed": true, "cmd": ["echo", "This is on the main host"], "delta": "0:00:00.001749", "end": "2014-04-03 13:19:42.459113", "item": "", "rc": 0, "start": "2014-04-03 13:19:42.457364", "stderr": "", "stdout": "This is on the main host"}