blob: 0a67b21932cb10cf06129c730e79351523d749c4 (
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
34
35
36
37
38
39
40
41
42
43
|
---
# Create the required PVs for the App and the DB
- name: Check if the CFME App PV has been created
oc_obj:
namespace: "{{ openshift_cfme_project }}"
state: list
kind: pv
name: "{{ openshift_cfme_flavor_short }}-app"
register: miq_app_pv_check
- name: Check if the CFME DB PV has been created
oc_obj:
namespace: "{{ openshift_cfme_project }}"
state: list
kind: pv
name: "{{ openshift_cfme_flavor_short }}-db"
register: miq_db_pv_check
when:
- openshift_cfme_app_template in ['miq-template', 'cfme-template']
- name: Ensure the CFME App PV is created
oc_process:
namespace: "{{ openshift_cfme_project }}"
template_name: "{{ openshift_cfme_flavor }}-app-pv"
create: True
params:
PV_SIZE: "{{ openshift_cfme_app_pv_size }}"
BASE_PATH: "{{ openshift_cfme_storage_nfs_base_dir }}"
NFS_HOST: "{{ openshift_cfme_nfs_server }}"
when: miq_app_pv_check.results.results == [{}]
- name: Ensure the CFME DB PV is created
oc_process:
namespace: "{{ openshift_cfme_project }}"
template_name: "{{ openshift_cfme_flavor }}-db-pv"
create: True
params:
PV_SIZE: "{{ openshift_cfme_db_pv_size }}"
BASE_PATH: "{{ openshift_cfme_storage_nfs_base_dir }}"
NFS_HOST: "{{ openshift_cfme_nfs_server }}"
when:
- openshift_cfme_app_template in ['miq-template', 'cfme-template']
- miq_db_pv_check.results.results == [{}]
|