Using Ansible.cfg with roles and tasks

24 views
Skip to first unread message

Rick O'Shea

unread,
May 1, 2016, 2:53:04 PM5/1/16
to Ansible Project
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. 

Brian Coca

unread,
May 2, 2016, 6:17:48 PM5/2/16
to ansible...@googlegroups.com
you can set the equivalent host var (ansible_ssh_args), in group_vars/all adjacent to play.


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages