Ansible Using Custom ssh config File

ansible

Solution

You can set ssh arguments globally in the `ansible.cfg`:

[ssh_connection]
ssh_args = -F ~/.ssh/client_1_config

Via behavioral inventory parameters you can set it per host or group

amazon-server-01 ansible_ssh_common_args=~/.ssh/client_1_config

Problem

I have a custom SSH config file that I typically use as follows ``` ssh -F ~/.ssh/client_1_config amazon-server-01 ``` Is it possible to assign Ansible to use this config for certain groups? It already has the keys and ports and users all set up. I have this sort of config for multiple clients, and would like to keep the config separate if possible.

Original source