summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sauer <esauer@redhat.com>2016-06-03 18:01:05 -0400
committerEric Sauer <esauer@redhat.com>2016-06-03 18:01:05 -0400
commite4c6ba27a5fe784143831e02e5181794c1b953b2 (patch)
tree129b581031491df5e60d9a8f93f1ace196fe1d90
parentc8f84c0aebe1fe9c00498921c5f83022a2e873c3 (diff)
downloadopenshift-e4c6ba27a5fe784143831e02e5181794c1b953b2.tar.gz
openshift-e4c6ba27a5fe784143831e02e5181794c1b953b2.tar.bz2
openshift-e4c6ba27a5fe784143831e02e5181794c1b953b2.tar.xz
openshift-e4c6ba27a5fe784143831e02e5181794c1b953b2.zip
Reverting previous commit and making template adjustments
-rw-r--r--roles/hostnames/tasks/main.yaml8
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/hostnames/tasks/main.yaml b/roles/hostnames/tasks/main.yaml
index c34d07915..700845e47 100644
--- a/roles/hostnames/tasks/main.yaml
+++ b/roles/hostnames/tasks/main.yaml
@@ -3,10 +3,18 @@
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 facts for masters
+ set_fact: ansible_hostname="{% for thishost in groups['openshift_masters'] %}{% if inventory_hostname == thishost %}master{{ counter }}{% 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: Setting facts for nodes
+ set_fact: ansible_hostname="{% for thishost in groups['openshift_nodes'] %}{% if inventory_hostname == thishost %}node{{ counter }}{% endif %}{% set counter = counter + 1 %}{% endfor %}"
+ when: "'openshift_nodes' in group_names"
+
- name: "Templating records"
become: false
remote_user: cloud-user