Ansible: Re-enable ControlPersist defaults when ANSIBLE_SSH_ARGS is used
Solve problem discussed in [GH-2952]
This commit is contained in:
parent
fa537740c6
commit
1c0bc20d21
|
@ -189,6 +189,15 @@ module VagrantPlugins
|
|||
# SSH Forwarding
|
||||
ssh_options << "-o ForwardAgent=yes" if @ssh_info[:forward_agent]
|
||||
|
||||
# Re-enable ControlPersist Ansible defaults,
|
||||
# which are lost when ANSIBLE_SSH_ARGS is defined.
|
||||
unless ssh_options.empty?
|
||||
ssh_options << "-o ControlMaster=auto"
|
||||
ssh_options << "-o ControlPersist=60s"
|
||||
# Intentionally keep ControlPath undefined to let ansible-playbook
|
||||
# automatically sets this option to Ansible default value
|
||||
end
|
||||
|
||||
ssh_options.join(' ')
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue