summaryrefslogtreecommitdiffstats
path: root/playbooks/openshift-setup-storage.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/openshift-setup-storage.yml')
-rw-r--r--playbooks/openshift-setup-storage.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/playbooks/openshift-setup-storage.yml b/playbooks/openshift-setup-storage.yml
new file mode 100644
index 0000000..387b775
--- /dev/null
+++ b/playbooks/openshift-setup-storage.yml
@@ -0,0 +1,37 @@
+---
+- name: Configure GlusterFS storage
+ hosts: nodes
+ roles:
+ - { role: ands_facts }
+
+- name: Configure GlusterFS storage
+ hosts: nodes
+ roles:
+ - { role: glusterfs, subrole: volumes }
+ vars:
+ glusterfs_network: "{{ ands_storage_network }}"
+ glusterfs_servers: "{{ ands_storage_servers }}"
+ glusterfs_bricks_path: "{{ ands_data_path }}/glusterfs"
+ glusterfs_domains: "{{ ands_storage_domains }}"
+
+
+- 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'] }}"
+
+- name: Configure OpenShift volumes
+ hosts: masters
+ roles:
+ - { role: ands_openshift, subrole: storage }
+
+- 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))
+
+# we also reconfigure kaas to populate new configs?