summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2016-08-11 11:23:54 -0500
committerAndy Doan <andy.doan@linaro.org>2016-08-17 15:21:29 +0000
commitff121649d1386f64b61809f87cb1f0cb5b8f0096 (patch)
tree9f1ea8e505a2e101aebb43245ac4c6ce2eb16cc0 /templates
parentca7d14f6cbdb64e0ae789edd7a2bffcc03b19af1 (diff)
downloadansible-playbooks-ff121649d1386f64b61809f87cb1f0cb5b8f0096.tar.gz
colo: Simplify notion of "racks"
We are hard-coding the number of racks. This makes them an array. It also makes some long-needed cleanup to aus-colo hosts. Change-Id: Ia8fb6deebf55b076213f33f202fb5754e967d01c Reviewed-on: https://review.linaro.org/13736 Reviewed-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/router/r1-x86-2-dnsmasq27
1 files changed, 7 insertions, 20 deletions
diff --git a/templates/router/r1-x86-2-dnsmasq b/templates/router/r1-x86-2-dnsmasq
index a7d19f0..6181adc 100644
--- a/templates/router/r1-x86-2-dnsmasq
+++ b/templates/router/r1-x86-2-dnsmasq
@@ -16,35 +16,22 @@ dhcp-range=em1.30,10.30.0.100,10.30.3.250,255.255.0.0,24h
# rack3 note: 10.33.10.1->10.33.99.250 is used by openstack
dhcp-range=em1.33,10.33.0.100,10.33.3.250,255.255.0.0,24h
-# rack1 hosts
-{% for host in r1_hosts %}
+{% for rack in racks %}
+# rack {{rack.name}}
+{% for host in rack.hosts %}
{% if host.tag is defined %}
dhcp-host={{host.mac}},set:{{host.tag}},{{host.name}},{{host.ip}}
{% else %}
-dhcp-host={{host.mac}},set:rack1,{{host.name}},{{host.ip}}
+dhcp-host={{host.mac}},set:{{rack.name}},{{host.name}},{{host.ip}}
{% endif %}
{% endfor %}
-
-# rack2 hosts
-{% for host in r2_hosts %}
-dhcp-host={{host.mac}},set:rack2,{{host.name}},{{host.ip}}
-{% endfor %}
-
-# rack3 hosts
-{% for host in r3_hosts %}
-{% if host.tag is defined %}
-dhcp-host={{host.mac}},set:{{host.tag}},{{host.name}},{{host.ip}}
-{% else %}
-dhcp-host={{host.mac}},set:rack3,{{host.name}},{{host.ip}}
-{% endif %}
{% endfor %}
enable-tftp
tftp-root=/var/lib/tftpboot/
-# enable MAAS installs
-dhcp-boot=tag:rack1,pxelinux.0,r1-maas-server,10.10.0.20
-dhcp-boot=tag:rack2,/pxelinux/grubaa64.efi,r2-x86-1,10.20.0.20
-dhcp-boot=tag:rack3,/pxelinux/bootnetaa64.efi,r2-x86-1,10.20.0.20
+dhcp-boot=tag:r1,/pxelinux/grubaa64.efi,r2-x86-1,10.20.0.20
+dhcp-boot=tag:r2,/pxelinux/grubaa64.efi,r2-x86-1,10.20.0.20
+dhcp-boot=tag:r3,/pxelinux/bootnetaa64.efi,r2-x86-1,10.20.0.20
dhcp-boot=tag:rack3x,/pxelinux/bootnetx64.efi,r2-x86-1,10.20.0.20
dhcp-boot=tag:qa-net,/pxelinux/grubaa64.efi,r2-x86-1,10.10.0.204