Using Ansible.cfg with roles and tasks

I have roles that depend on the ssh_args settings of the local Ansible.cfg, and they succeed.

I also have a role that assumes different ssh_args values, and it fails.

How do we specify Ansible.cfg settings specific to a role or to a playbook (that uses those roles)?

/playbooks
a.yml
b.yml
c**.**yml
Ansible.cfg
/roles
/foo
/bar
/baz
/qux

I haven’t seen any information using Ansible.cfg with roles.

Ugly workaround: completely separate folder hierarchy for each Ansible.cfg group.

you can set the equivalent host var (ansible_ssh_args), in group_vars/all adjacent to play.