summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2016-05-04 12:15:38 -0500
committerAndy Doan <andy.doan@linaro.org>2016-05-04 12:15:38 -0500
commitaf82101c7f2a6fb69eda9ea0ca7d04b15c1f9254 (patch)
treedd65846e5d49d03b5c39d3fbd430a14573c30cd3
parentf8bb0eb2d30ad01b8e459c8b78498f9d27ce9a09 (diff)
downloadansible-playbooks-af82101c7f2a6fb69eda9ea0ca7d04b15c1f9254.tar.gz
colo: allow dns aliases
We have nodes in openstack that need an alias. This makes generic support for the feature. Change-Id: I8a72062dc5155169f0688ed9e3bf771c798e1a60
-rw-r--r--host_vars/aus-colo.linaro.org1
-rw-r--r--roles/colo-router/templates/hosts.j29
2 files changed, 7 insertions, 3 deletions
diff --git a/host_vars/aus-colo.linaro.org b/host_vars/aus-colo.linaro.org
index 989205a..ccccd20 100644
--- a/host_vars/aus-colo.linaro.org
+++ b/host_vars/aus-colo.linaro.org
@@ -318,6 +318,7 @@ r3_hosts:
tag: rack3x
- mac: "14:58:d0:58:c2:22"
name: r3-m1-c4
+ alias: controller
ip: 10.33.100.4
pxe: true
- mac: "14:58:d0:58:a2:12"
diff --git a/roles/colo-router/templates/hosts.j2 b/roles/colo-router/templates/hosts.j2
index 57f7619..3d8dfd6 100644
--- a/roles/colo-router/templates/hosts.j2
+++ b/roles/colo-router/templates/hosts.j2
@@ -9,15 +9,18 @@ ff02::2 ip6-allrouters
# rack 1 lookups
{% for host in r1_hosts %}
-{{host.ip}} {{host.name}}
+{{host.ip}} {{host.name}} {%if host.alias is defined %}{{host.alias}}{%endif%}
+
{% endfor %}
# rack 2 lookups
{% for host in r2_hosts %}
-{{host.ip}} {{host.name}}
+{{host.ip}} {{host.name}} {%if host.alias is defined %}{{host.alias}}{%endif%}
+
{% endfor %}
# rack 3 lookups
{% for host in r3_hosts %}
-{{host.ip}} {{host.name}}
+{{host.ip}} {{host.name}} {%if host.alias is defined %}{{host.alias}}{%endif%}
+
{% endfor %}