summaryrefslogtreecommitdiffstats
path: root/playbooks/openshift-install.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/openshift-install.yml')
-rw-r--r--playbooks/openshift-install.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/playbooks/openshift-install.yml b/playbooks/openshift-install.yml
new file mode 100644
index 0000000..c54f4ee
--- /dev/null
+++ b/playbooks/openshift-install.yml
@@ -0,0 +1,22 @@
+- name: Configure cluster hosts names
+ hosts: nodes
+ roles:
+ - { role: ands_facts }
+ - { role: ands_openshift, subrole: hostnames }
+
+- name: Temporary provision /etc/hosts with Masters IP.
+ hosts: nodes:!masters
+ tasks:
+ - lineinfile: dest="/etc/hosts" line="{{ ands_openshift_network | ipaddr(node_id) | ipaddr('address') }} {{ ands_openshift_lb }}" regexp=".*{{ ands_openshift_lb }}$" state="present"
+ when: (ands_provision_without_dns | default(false))
+ vars:
+ node_id: "{{ hostvars[groups['masters'][0]]['ands_host_id'] }}"
+
+
+- include: ../../openshift-ansible/playbooks/byo/config.yml
+
+- name: Remove temporary entries in /etc/hosts
+ hosts: nodes:!masters
+ tasks:
+ - lineinfile: dest="/etc/hosts" regexp=".*{{ ands_openshift_lb }}$" state="absent"
+ when: (ands_provision_without_dns | default(false))