summaryrefslogtreecommitdiffstats
path: root/roles/ands_openshift/tasks/storage_resources.yml
blob: 5adf69ee10824c216dc88c2d779516e60e6c02c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
- name: Ensure OpenShift template directory exists
  file: path="{{ storage_template_path }}" state="directory" mode=0644 owner=root group=root

- name: Copy GlusterFS service template
  copy: src="gfs-svc.yml" dest="{{ storage_template_path }}/gfs-svc.yml" owner=root group=root mode="0644"
  register: result

- name: Configure GFS service & endpoints
  include_role: name="openshift_resource"
  vars: 
    template: gfs-svc.yml 
    template_path: "{{ storage_template_path }}"
    project: "{{ prj_item }}" 
    recreate: "{{ result | changed | ternary (true, false) }}"
  with_items: "{{ ands_openshift_projects.keys() | union(['default']) }}"
  loop_control: 
    loop_var: prj_item

- name: Configure GlusterFS end-points
  template: src="gfs-ep.yml.j2" dest="{{ storage_template_path }}/gfs-ep.yml" owner=root group=root mode="0644"
  register: result

- name: Configure GFS service & endpoints
  include_role: name="openshift_resource"
  vars: 
    template: gfs-ep.yml 
    template_path: "{{ storage_template_path }}"
    project: "{{ prj_item }}"
    recreate: "{{ result | changed | ternary (true, false) }}"
  with_items: "{{ ands_openshift_projects.keys() | union(['default']) }}"
  loop_control: 
    loop_var: prj_item