From ca1b17aeeb8ed4f4db0a90a11bccd9ea009f9eac Mon Sep 17 00:00:00 2001
From: Eric Sauer <esauer@redhat.com>
Date: Fri, 13 May 2016 16:25:19 -0400
Subject: Changes by JayKayy for a full provision of OpenShift on OpenStack

---
 roles/hostnames/templates/records.template.yaml | 28 +++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 roles/hostnames/templates/records.template.yaml

(limited to 'roles/hostnames/templates')

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 %}
-- 
cgit v1.2.3