summaryrefslogtreecommitdiffstats
path: root/roles/hostnames/tasks/main.yaml
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/tasks/main.yaml
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/tasks/main.yaml')
-rw-r--r--roles/hostnames/tasks/main.yaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/hostnames/tasks/main.yaml b/roles/hostnames/tasks/main.yaml
new file mode 100644
index 000000000..921cd664b
--- /dev/null
+++ b/roles/hostnames/tasks/main.yaml
@@ -0,0 +1,17 @@
+---
+ - name: Setting master(s) hostname
+ hostname: name="{% for thishost in groups['openshift_masters'] %}{% if inventory_hostname == thishost %}master{{ counter }}.{{ dns_domain }}{% endif %}{% set counter = counter + 1 %}{% endfor %}"
+ when: "'openshift_masters' in group_names"
+
+ - name: Setting node(s) hostname
+ hostname: name="{% for thishost in groups['openshift_nodes'] %}{% if inventory_hostname == thishost %}node{{ counter }}.{{ dns_domain }}{% endif %}{% set counter = counter + 1 %}{% endfor %}"
+ when: "'openshift_nodes' in group_names"
+
+ - name: "Templating records"
+ become: false
+ remote_user: cloud-user
+ template:
+ src: "{{ role_path }}/templates/records.template.yaml"
+ dest: "/tmp/records.yaml"
+ force: yes
+ delegate_to: localhost