summaryrefslogtreecommitdiffstats
path: root/roles/hostnames/templates
diff options
context:
space:
mode:
authorEric Sauer <esauer@redhat.com>2016-05-13 16:25:19 -0400
committerEric Sauer <esauer@redhat.com>2016-05-13 16:25:19 -0400
commitca1b17aeeb8ed4f4db0a90a11bccd9ea009f9eac (patch)
tree2218eb6052888edd805b531699b91fc1aa9efeca /roles/hostnames/templates
parentab61cddece9f010c17c1700b061638709701ee90 (diff)
downloadopenshift-ca1b17aeeb8ed4f4db0a90a11bccd9ea009f9eac.tar.gz
openshift-ca1b17aeeb8ed4f4db0a90a11bccd9ea009f9eac.tar.bz2
openshift-ca1b17aeeb8ed4f4db0a90a11bccd9ea009f9eac.tar.xz
openshift-ca1b17aeeb8ed4f4db0a90a11bccd9ea009f9eac.zip
Changes by JayKayy for a full provision of OpenShift on OpenStack
Diffstat (limited to 'roles/hostnames/templates')
-rw-r--r--roles/hostnames/templates/records.template.yaml28
1 files changed, 28 insertions, 0 deletions
diff --git a/roles/hostnames/templates/records.template.yaml b/roles/hostnames/templates/records.template.yaml
new file mode 100644
index 000000000..a916fd2b3
--- /dev/null
+++ b/roles/hostnames/templates/records.template.yaml
@@ -0,0 +1,28 @@
+---
+dns_records_add:
+ - view: private
+ zone: {{ dns_domain }}
+ entries:
+{% for mst in groups['openshift_masters'] %}
+ - type: A
+ hostname: {{ hostvars[mst]['ansible_hostname'] }}
+ ip: {{ hostvars[mst]['dns_private_ip'] }}
+{% endfor %}
+{% for node in groups['openshift_nodes'] %}
+ - type: A
+ hostname: {{ hostvars[node]['ansible_hostname'] }}
+ ip: {{ hostvars[node]['dns_private_ip'] }}
+{% endfor %}
+ - view: public
+ zone: {{ dns_domain}}
+ entries:
+{% for mst in groups['openshift_masters']%}
+ - type: A
+ hostname: {{ hostvars[mst]['ansible_hostname'] }}
+ ip: {{ hostvars[mst]['dns_public_ip'] }}
+{% endfor %}
+{% for node in groups['openshift_nodes'] %}
+ - type: A
+ hostname: {{ hostvars[node]['ansible_hostname'] }}
+ ip: {{ hostvars[node]['dns_public_ip'] }}
+{% endfor %}