summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cfme/tasks/storage
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_cfme/tasks/storage')
-rw-r--r--roles/openshift_cfme/tasks/storage/create_nfs_pvs.yml69
-rw-r--r--roles/openshift_cfme/tasks/storage/nfs.yml67
-rw-r--r--roles/openshift_cfme/tasks/storage/storage.yml3
3 files changed, 0 insertions, 139 deletions
diff --git a/roles/openshift_cfme/tasks/storage/create_nfs_pvs.yml b/roles/openshift_cfme/tasks/storage/create_nfs_pvs.yml
deleted file mode 100644
index d5252464e..000000000
--- a/roles/openshift_cfme/tasks/storage/create_nfs_pvs.yml
+++ /dev/null
@@ -1,69 +0,0 @@
----
-# Create the required PVs for the App and the DB
-- name: Note the App PV Size from Template Parameters
- set_fact:
- openshift_cfme_app_pv_size: "{{ openshift_cfme_template_parameters.APPLICATION_VOLUME_CAPACITY }}"
- when:
- - openshift_cfme_template_parameters.APPLICATION_VOLUME_CAPACITY is defined
-
-- name: Note the App PV Size from defaults
- set_fact:
- openshift_cfme_app_pv_size: "{{ __openshift_cfme_app_pv_size }}"
- when:
- - openshift_cfme_template_parameters.APPLICATION_VOLUME_CAPACITY is not defined
-
-- when: openshift_cfme_app_template in ['miq-template', 'cfme-template']
- block:
- - name: Note the DB PV Size from Template Parameters
- set_fact:
- openshift_cfme_db_pv_size: "{{ openshift_cfme_template_parameters.DATABASE_VOLUME_CAPACITY }}"
- when:
- - openshift_cfme_template_parameters.DATABASE_VOLUME_CAPACITY is defined
-
- - name: Note the DB PV Size from defaults
- set_fact:
- openshift_cfme_db_pv_size: "{{ __openshift_cfme_db_pv_size }}"
- when:
- - openshift_cfme_template_parameters.DATABASE_VOLUME_CAPACITY is not defined
-
-- 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 == [{}]
diff --git a/roles/openshift_cfme/tasks/storage/nfs.yml b/roles/openshift_cfme/tasks/storage/nfs.yml
deleted file mode 100644
index c17544480..000000000
--- a/roles/openshift_cfme/tasks/storage/nfs.yml
+++ /dev/null
@@ -1,67 +0,0 @@
----
-# Tasks to statically provision NFS volumes
-# Include if not using dynamic volume provisioning
-
-- name: Ensure we save the local NFS server if one is provided
- set_fact:
- openshift_cfme_nfs_server: "{{ openshift_cfme_storage_nfs_local_hostname }}"
- when:
- - openshift_cfme_storage_nfs_local_hostname is defined
- - openshift_cfme_storage_nfs_local_hostname != False
- - openshift_cfme_storage_class == "nfs"
-
-- name: Ensure we save the local NFS server
- set_fact:
- openshift_cfme_nfs_server: "{{ groups['oo_nfs_to_config'].0 }}"
- when:
- - openshift_cfme_nfs_server is not defined
- - openshift_cfme_storage_class == "nfs"
-
-- name: Ensure we save the external NFS server
- set_fact:
- openshift_cfme_nfs_server: "{{ openshift_cfme_storage_nfs_external_hostname }}"
- when:
- - openshift_cfme_storage_class == "nfs_external"
-
-- name: Failed NFS server detection
- assert:
- that:
- - openshift_cfme_nfs_server is defined
- msg: |
- "Unable to detect an NFS server. The 'nfs_external'
- openshift_cfme_storage_class option requires that you set
- openshift_cfme_storage_nfs_external_hostname. NFS hosts detected
- for local nfs services: {{ groups['oo_nfs_to_config'] | join(', ') }}"
-
-- name: Setting up NFS storage
- block:
- - name: Include the NFS Setup role tasks
- include_role:
- role: openshift_nfs
- tasks_from: setup
- vars:
- l_nfs_base_dir: "{{ openshift_cfme_storage_nfs_base_dir }}"
-
- - name: Create the App export
- include_role:
- role: openshift_nfs
- tasks_from: create_export
- vars:
- l_nfs_base_dir: "{{ openshift_cfme_storage_nfs_base_dir }}"
- l_nfs_export_config: "{{ openshift_cfme_flavor_short }}"
- l_nfs_export_name: "{{ openshift_cfme_flavor_short }}-app"
- l_nfs_options: "*(rw,no_root_squash,no_wdelay)"
-
- - name: Create the DB export
- include_role:
- role: openshift_nfs
- tasks_from: create_export
- vars:
- l_nfs_base_dir: "{{ openshift_cfme_storage_nfs_base_dir }}"
- l_nfs_export_config: "{{ openshift_cfme_flavor_short }}"
- l_nfs_export_name: "{{ openshift_cfme_flavor_short }}-db"
- l_nfs_options: "*(rw,no_root_squash,no_wdelay)"
- when:
- - openshift_cfme_app_template in ['miq-template', 'cfme-template']
-
- delegate_to: "{{ openshift_cfme_nfs_server }}"
diff --git a/roles/openshift_cfme/tasks/storage/storage.yml b/roles/openshift_cfme/tasks/storage/storage.yml
deleted file mode 100644
index d8bf7aa3e..000000000
--- a/roles/openshift_cfme/tasks/storage/storage.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- include: nfs.yml
- when: not (openshift_cloudprovider_kind is defined and (openshift_cloudprovider_kind == 'aws' or openshift_cloudprovider_kind == 'gce'))