|
@@ -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
|