ansible/ansible — pull request #3451 by sergevanginderachter (2013-07-05 17:14:01+00:00)
Title: allow ansible_ssh_host to be templated

Use case: e.g. dual homed hosts on production and 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' }}