browbeat/ansible/ansible.cfg
akrzos b95cbeda49 Make Browbeat multi-cloud friendly.
This commit "localizes" ssh-config and heat-admin-id_rsa to your local
Browbeat directory.

This allows one to simply cd into the directory of the cloud they are
working with Browbeat against and ensure they do not incorrectly run
playbooks against the wrong hosts.

Example:

[akrzos@bithead ansible]$ ./generate_tripleo_hostfile.sh x.x.x.x
...
[akrzos@bithead ansible]$ ls -la
...
-rwxrwxr-x.  1 akrzos akrzos 9461 Aug 25 16:18 generate_tripleo_hostfile.sh
-rw-------.  1 akrzos akrzos 1675 Aug 27 14:16 heat-admin-id_rsa
-rw-rw-r--.  1 akrzos akrzos  338 Aug 27 14:16 hosts
-rw-------.  1 akrzos akrzos 2013 Aug 27 14:16 ssh-config
...
[akrzos@bithead ansible]$ ssh -F ssh-config  root@undercloud
[root@gprfc007 ~]# exit
logout
[akrzos@bithead ansible]$ ssh -F ssh-config  undercloud-stack
[stack@gprfc007 ~]$ exit
logout
[akrzos@bithead ansible]$ ssh -F ssh-config  undercloud-root
[root@gprfc007 ~]# exit
logout
[akrzos@bithead ansible]$ ssh -F ssh-config  overcloud-controller-0
Warning: Permanently added '10.16.154.18' (ECDSA) to the list of known hosts.
Warning: Permanently added 'overcloud-controller-0' (ECDSA) to the list of known hosts.
[heat-admin@overcloud-controller-0 ~]$ exit
logout
[akrzos@bithead ansible]$ ssh -F ssh-config  overcloud-controller-1
[heat-admin@overcloud-controller-1 ~]$ exit
logout
[akrzos@bithead ansible]$ ssh -F ssh-config  overcloud-controller-2
[heat-admin@overcloud-controller-2 ~]$ exit
logout
[akrzos@bithead ansible]$ ssh -F ssh-config  overcloud-novacompute-0
[heat-admin@overcloud-novacompute-0 ~]$ exit
logout
[akrzos@bithead ansible]$ ansible-playbook -i hosts install/collectd-openstack.yml
...

Tested against the collectd-openstack and grafana-dashboards playbooks

Potential issues:

CI? (Does CI execute any playbooks from the ansible directory?  If so
we shouldn't have an issue here.)

lib/{ansible/adjustments} - Can we make sure to pass the either the
correct ssh-config or use the ansible.cfg inside ansible/?

Change-Id: I4764490e5164f7d4d896cbe5bd26e6a59d770df4
2016-08-30 21:09:47 -04:00

10 lines
230 B
INI

[defaults]
gathering = smart
fact_caching_timeout = 86400
fact_caching = jsonfile
fact_caching_connection = /tmp/browbeat_fact_cache
[ssh_connection]
# Load the specific ssh config file in this directory
ssh_args = -F ssh-config