To connect to different groups of hosts, I need to use different ssh config files. I'm currently trying to connect to both groups in the same playbook, but I can't figure out how to change ssh_args within the playbook. I was wondering if I could use group_vars to do this?
The way I currently set ssh_args is in ansible.cfg:
[ssh_connection]
ssh_args = -F ./ssh.cfg
Yes, but you should use ansible_ssh_common_args, see List of Behavioral Inventory Parameters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With