ansible/lib
Serge van Ginderachter 129c7522d9 allow ansible_ssh_host to be templated
Use case: e.g. dual homed hosts on production en management network

The inventory_hostname is the regular host name and matches the
dns name on the production network; ansible connects to the host
through a management network; the dns name on the management network
is standardized and equals ${inventory_hostname}-mgt.mynetwork.com

Now this can be configured as the default in group_vars/all:

   ansible_ssh_host: {{ inventory_hostname + '-mgt.mynetwork.com' }}
2013-07-05 18:05:26 +02:00
..
ansible allow ansible_ssh_host to be templated 2013-07-05 18:05:26 +02:00