ControlMaster settings not taking affect

76 views
Skip to first unread message

Greg Hurrell

unread,
May 21, 2014, 1:20:33 AM5/21/14
to ansible...@googlegroups.com
Hi,

I've noticed that Ansible isn't using ControlMaster in my local setup, making it slower than it needs to be.

This is Ansible 1.6.1, running on OS X 10.9.3 and connecting to remote hosts running CentOS 6.

If I connect to the remote host and tail -f /var/log/secure I can see tell-tale Accepted publickey for ec2-user entries getting added over and over again during Ansible runs.

I tried overriding the ssh_connection ssh_args setting to specify a specific ControlMaster path as suggested in the docs, but the only thing that works is setting up a specific entry in ~/.ssh/config for the hosts I'm connecting to with (something like):

Host *
ControlMaster auto
ControlPath  ~/.ssh/%r@%h:%p
ControlPersist 240

Any ideas why not this explicit set-up in ansible.cfg has any effect?

[ssh_connection]
ssh_args = -vvvv -o ControlMaster=auto -o ControlPersist=60s
control_path = %(directory)s/%%h-%%r

James Cammarata

unread,
May 21, 2014, 10:40:11 AM5/21/14
to ansible...@googlegroups.com
You should not need to specify those extra ssh_args if you're using the ssh transport and your system supports ControlPersist. Can you gist/pastebin the output of a test run using -vvvvv to see any additional SSH debugging information available?


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/335d4ae2-1d84-419c-8f19-34e10ad32b6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Greg Hurrell

unread,
May 21, 2014, 10:54:08 AM5/21/14
to ansible...@googlegroups.com
On Wednesday, May 21, 2014 7:40:11 AM UTC-7, James Cammarata wrote:
You should not need to specify those extra ssh_args if you're using the ssh transport and your system supports ControlPersist. Can you gist/pastebin the output of a test run using -vvvvv to see any additional SSH debugging information available?

Alas, the problem went away. On running ansible-playbook with -vvvv, I could see the right Control* options getting used, and /var/log/secure no longer showed any re-auths.

Sorry for the noise. :-(

-Greg
 

James Cammarata

unread,
May 21, 2014, 12:49:09 PM5/21/14
to ansible...@googlegroups.com
No problem, let us know if it reoccurs.

Thanks!


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages