Pārlūkot izejas kodu

Merge pull request #5682 from tbielawa/openshift_management

Rename openshift_cfme role to openshift_management
Scott Dodson 7 gadi atpakaļ
vecāks
revīzija
fced8262d2
46 mainītis faili ar 351 papildinājumiem un 341 dzēšanām
  1. 16 16
      inventory/byo/hosts.example
  2. 1 1
      playbooks/byo/openshift-cfme/config.yml
  3. 1 1
      playbooks/byo/openshift-cfme/uninstall.yml
  4. 2 2
      playbooks/common/openshift-cluster/config.yml
  5. 0 25
      playbooks/common/openshift-cluster/openshift_cfme.yml
  6. 25 0
      playbooks/common/openshift-cluster/openshift_management.yml
  7. 3 3
      playbooks/common/openshift-cfme/config.yml
  8. 0 0
      playbooks/common/openshift-management/filter_plugins
  9. 0 0
      playbooks/common/openshift-management/library
  10. 0 0
      playbooks/common/openshift-management/roles
  11. 1 1
      playbooks/common/openshift-cfme/uninstall.yml
  12. 5 0
      roles/installer_checkpoint/callback_plugins/installer_checkpoint.py
  13. 0 69
      roles/openshift_cfme/tasks/storage/create_nfs_pvs.yml
  14. 0 67
      roles/openshift_cfme/tasks/storage/nfs.yml
  15. 0 1
      roles/openshift_cfme/templates/openshift_cfme-miq-template-ext-db.exports.j2
  16. 0 2
      roles/openshift_cfme/templates/openshift_cfme-miq-template.exports.j2
  17. 58 50
      roles/openshift_cfme/README.md
  18. 11 11
      roles/openshift_cfme/defaults/main.yml
  19. 0 0
      roles/openshift_management/files/templates/cloudforms/cfme-backup-job.yaml
  20. 0 0
      roles/openshift_management/files/templates/cloudforms/cfme-backup-pvc.yaml
  21. 0 0
      roles/openshift_management/files/templates/cloudforms/cfme-pv-backup-example.yaml
  22. 0 0
      roles/openshift_management/files/templates/cloudforms/cfme-pv-db-example.yaml
  23. 0 0
      roles/openshift_management/files/templates/cloudforms/cfme-pv-server-example.yaml
  24. 0 0
      roles/openshift_management/files/templates/cloudforms/cfme-restore-job.yaml
  25. 0 0
      roles/openshift_management/files/templates/cloudforms/cfme-scc-sysadmin.yaml
  26. 0 0
      roles/openshift_management/files/templates/cloudforms/cfme-template-ext-db.yaml
  27. 0 0
      roles/openshift_management/files/templates/cloudforms/cfme-template.yaml
  28. 0 0
      roles/openshift_management/files/templates/manageiq/miq-backup-job.yaml
  29. 0 0
      roles/openshift_management/files/templates/manageiq/miq-backup-pvc.yaml
  30. 0 0
      roles/openshift_management/files/templates/manageiq/miq-pv-backup-example.yaml
  31. 0 0
      roles/openshift_management/files/templates/manageiq/miq-pv-db-example.yaml
  32. 0 0
      roles/openshift_management/files/templates/manageiq/miq-pv-server-example.yaml
  33. 0 0
      roles/openshift_management/files/templates/manageiq/miq-restore-job.yaml
  34. 0 0
      roles/openshift_management/files/templates/manageiq/miq-template-ext-db.yaml
  35. 0 0
      roles/openshift_management/files/templates/manageiq/miq-template.yaml
  36. 0 0
      roles/openshift_management/handlers/main.yml
  37. 0 0
      roles/openshift_management/meta/main.yml
  38. 7 7
      roles/openshift_cfme/tasks/accounts.yml
  39. 19 19
      roles/openshift_cfme/tasks/main.yml
  40. 69 0
      roles/openshift_management/tasks/storage/create_nfs_pvs.yml
  41. 67 0
      roles/openshift_management/tasks/storage/nfs.yml
  42. 0 0
      roles/openshift_management/tasks/storage/storage.yml
  43. 27 27
      roles/openshift_cfme/tasks/template.yml
  44. 3 3
      roles/openshift_cfme/tasks/uninstall.yml
  45. 23 23
      roles/openshift_cfme/tasks/validate.yml
  46. 13 13
      roles/openshift_cfme/vars/main.yml

+ 16 - 16
inventory/byo/hosts.example

@@ -240,9 +240,9 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true',
 # CloudForms Management Engine (ManageIQ) App Install
 #
 # Enables installation of MIQ server. Recommended for dedicated
-# clusters only. See roles/openshift_cfme/README.md for instructions
+# clusters only. See roles/openshift_management/README.md for instructions
 # and requirements.
-#openshift_cfme_install_app=False
+#openshift_management_install_management=False
 
 # Cloud Provider Configuration
 #
@@ -920,31 +920,31 @@ ose3-node[1:2]-ansible.test.example.com openshift_node_labels="{'region': 'prima
 # CloudForms/ManageIQ (CFME/MIQ) Configuration
 
 # See the readme for full descriptions and getting started
-# instructions: ../../roles/openshift_cfme/README.md or go directly to
-# their definitions: ../../roles/openshift_cfme/defaults/main.yml
-# ../../roles/openshift_cfme/vars/main.yml
+# instructions: ../../roles/openshift_management/README.md or go directly to
+# their definitions: ../../roles/openshift_management/defaults/main.yml
+# ../../roles/openshift_management/vars/main.yml
 #
 # Namespace for the CFME project
-#openshift_cfme_project: openshift-cfme
+#openshift_management_project: openshift-management
 
 # Namespace/project description
-#openshift_cfme_project_description: CloudForms Management Engine
+#openshift_management_project_description: CloudForms Management Engine
 
 # Choose 'miq-template' for a podified database install
 # Choose 'miq-template-ext-db' for an external database install
 #
 # If you are using the miq-template-ext-db template then you must add
 # the required database parameters to the
-# openshift_cfme_template_parameters variable.
-#openshift_cfme_app_template: miq-template
+# openshift_management_template_parameters variable.
+#openshift_management_app_template: miq-template
 
 # Allowed options: nfs, nfs_external, preconfigured, cloudprovider.
-#openshift_cfme_storage_class: nfs
+#openshift_management_storage_class: nfs
 
 # [OPTIONAL] - If you are using an EXTERNAL NFS server, such as a
 # netapp appliance, then you must set the hostname here. Leave the
 # value as 'false' if you are not using external NFS.
-#openshift_cfme_storage_nfs_external_hostname: false
+#openshift_management_storage_nfs_external_hostname: false
 
 # [OPTIONAL] - If you are using external NFS then you must set the base
 # path to the exports location here.
@@ -952,19 +952,19 @@ ose3-node[1:2]-ansible.test.example.com openshift_node_labels="{'region': 'prima
 # Additionally: EXTERNAL NFS REQUIRES that YOU CREATE the nfs exports
 # that will back the application PV and optionally the database
 # pv. Export path definitions, relative to
-# {{ openshift_cfme_storage_nfs_base_dir }}
+# {{ openshift_management_storage_nfs_base_dir }}
 #
 # LOCAL NFS NOTE:
 #
 # You may may also change this value if you want to change the default
 # path used for local NFS exports.
-#openshift_cfme_storage_nfs_base_dir: /exports
+#openshift_management_storage_nfs_base_dir: /exports
 
 # LOCAL NFS NOTE:
 #
 # You may override the automatically selected LOCAL NFS server by
 # setting this variable. Useful for testing specific task files.
-#openshift_cfme_storage_nfs_local_hostname: false
+#openshift_management_storage_nfs_local_hostname: false
 
 # A hash of parameters you want to override or set in the
 # miq-template.yaml or miq-template-ext-db.yaml templates. Set this in
@@ -972,5 +972,5 @@ ose3-node[1:2]-ansible.test.example.com openshift_node_labels="{'region': 'prima
 # under the .parameters list in files/miq-template{-ext-db}.yaml
 # Example:
 #
-# openshift_cfme_template_parameters={'APPLICATION_MEM_REQ': '512Mi'}
-#openshift_cfme_template_parameters: {}
+# openshift_management_template_parameters={'APPLICATION_MEM_REQ': '512Mi'}
+#openshift_management_template_parameters: {}

+ 1 - 1
playbooks/byo/openshift-cfme/config.yml

@@ -5,4 +5,4 @@
 
 - include: ../../common/openshift-cluster/evaluate_groups.yml
 
-- include: ../../common/openshift-cfme/config.yml
+- include: ../../common/openshift-management/config.yml

+ 1 - 1
playbooks/byo/openshift-cfme/uninstall.yml

@@ -3,4 +3,4 @@
 #   tags:
 #     - always
 
-- include: ../../common/openshift-cfme/uninstall.yml
+- include: ../../common/openshift-management/uninstall.yml

+ 2 - 2
playbooks/common/openshift-cluster/config.yml

@@ -46,8 +46,8 @@
 - include: service_catalog.yml
   when: openshift_enable_service_catalog | default(false) | bool
 
-- include: openshift_cfme.yml
-  when: openshift_cfme_install_cfme | default(false) | bool
+- include: openshift_management.yml
+  when: openshift_management_install_management | default(false) | bool
 
 - name: Print deprecated variable warning message if necessary
   hosts: oo_first_master

+ 0 - 25
playbooks/common/openshift-cluster/openshift_cfme.yml

@@ -1,25 +0,0 @@
----
-- name: CFME Install Checkpoint Start
-  hosts: localhost
-  connection: local
-  gather_facts: false
-  tasks:
-  - name: Set CFME install 'In Progress'
-    set_stats:
-      data:
-        installer_phase_cfme: "In Progress"
-      aggregate: false
-
-- name: CFME
-  include: ../openshift-cfme/config.yml
-
-- name: CFME Install Checkpoint End
-  hosts: localhost
-  connection: local
-  gather_facts: false
-  tasks:
-  - name: Set CFME install 'Complete'
-    set_stats:
-      data:
-        installer_phase_CFME: "Complete"
-      aggregate: false

+ 25 - 0
playbooks/common/openshift-cluster/openshift_management.yml

@@ -0,0 +1,25 @@
+---
+- name: Management Install Checkpoint Start
+  hosts: localhost
+  connection: local
+  gather_facts: false
+  tasks:
+  - name: Set Management install 'In Progress'
+    set_stats:
+      data:
+        installer_phase_Management: "In Progress"
+      aggregate: false
+
+- name: Management
+  include: ../openshift-management/config.yml
+
+- name: Management Install Checkpoint End
+  hosts: localhost
+  connection: local
+  gather_facts: false
+  tasks:
+  - name: Set Management install 'Complete'
+    set_stats:
+      data:
+        installer_phase_Management: "Complete"
+      aggregate: false

+ 3 - 3
playbooks/common/openshift-cfme/config.yml

@@ -4,12 +4,12 @@
   pre_tasks:
   - name: Create a temporary place to evaluate the PV templates
     command: mktemp -d /tmp/openshift-ansible-XXXXXXX
-    register: r_openshift_cfme_mktemp
+    register: r_openshift_management_mktemp
     changed_when: false
 
   tasks:
   - name: Run the CFME Setup Role
     include_role:
-      name: openshift_cfme
+      name: openshift_management
     vars:
-      template_dir: "{{ hostvars[groups.masters.0].r_openshift_cfme_mktemp.stdout }}"
+      template_dir: "{{ hostvars[groups.masters.0].r_openshift_management_mktemp.stdout }}"

playbooks/common/openshift-cfme/filter_plugins → playbooks/common/openshift-management/filter_plugins


playbooks/common/openshift-cfme/library → playbooks/common/openshift-management/library


playbooks/common/openshift-cfme/roles → playbooks/common/openshift-management/roles


+ 1 - 1
playbooks/common/openshift-cfme/uninstall.yml

@@ -4,5 +4,5 @@
   tasks:
   - name: Run the CFME Uninstall Role Tasks
     include_role:
-      name: openshift_cfme
+      name: openshift_management
       tasks_from: uninstall

+ 5 - 0
roles/installer_checkpoint/callback_plugins/installer_checkpoint.py

@@ -81,6 +81,7 @@ class CallbackModule(CallbackBase):
             'installer_phase_metrics',
             'installer_phase_logging',
             'installer_phase_servicecatalog',
+            'installer_phase_management',
         ]
 
         # Define the attributes of the installer phases
@@ -133,6 +134,10 @@ class CallbackModule(CallbackBase):
                 'title': 'Service Catalog Install',
                 'playbook': 'playbooks/byo/openshift-cluster/service-catalog.yml'
             },
+            'installer_phase_management': {
+                'title': 'Management Install',
+                'playbook': 'playbooks/common/openshift-cluster/openshift_management.yml'
+            },
         }
 
         # Find the longest phase title

+ 0 - 69
roles/openshift_cfme/tasks/storage/create_nfs_pvs.yml

@@ -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 == [{}]

+ 0 - 67
roles/openshift_cfme/tasks/storage/nfs.yml

@@ -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 }}"

+ 0 - 1
roles/openshift_cfme/templates/openshift_cfme-miq-template-ext-db.exports.j2

@@ -1 +0,0 @@
-{{ openshift_cfme_storage_nfs_base_dir }}/{{ openshift_cfme_flavor_short }}-app *(rw,no_root_squash,no_wdelay)

+ 0 - 2
roles/openshift_cfme/templates/openshift_cfme-miq-template.exports.j2

@@ -1,2 +0,0 @@
-{{ openshift_cfme_storage_nfs_base_dir }}/{{ openshift_cfme_flavor_short }}-app *(rw,no_root_squash,no_wdelay)
-{{ openshift_cfme_storage_nfs_base_dir }}/{{ openshift_cfme_flavor_short }}-db *(rw,no_root_squash,no_wdelay)

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 58 - 50
roles/openshift_cfme/README.md


+ 11 - 11
roles/openshift_cfme/defaults/main.yml

@@ -1,8 +1,8 @@
 ---
 # Namespace for the CFME project
-openshift_cfme_project: openshift-cfme
+openshift_management_project: openshift-management
 # Namespace/project description
-openshift_cfme_project_description: CloudForms Management Engine
+openshift_management_project_description: CloudForms Management Engine
 
 ######################################################################
 # BASE TEMPLATE AND DATABASE OPTIONS
@@ -13,17 +13,17 @@ openshift_cfme_project_description: CloudForms Management Engine
 #
 # Choose 'miq-template' for a podified database install
 # Choose 'miq-template-ext-db' for an external database install
-openshift_cfme_app_template: miq-template
+openshift_management_app_template: miq-template
 # If you are using the miq-template-ext-db template then you must add
 # the required database parameters to the
-# openshift_cfme_template_parameters variable.
+# openshift_management_template_parameters variable.
 
 ######################################################################
 # STORAGE OPTIONS
 ######################################################################
 # DEFAULT - 'nfs'
 # Allowed options: nfs, nfs_external, preconfigured, cloudprovider.
-openshift_cfme_storage_class: nfs
+openshift_management_storage_class: nfs
 # * nfs - Best used for proof-of-concept installs. Will setup NFS on a
 #   cluster host (defaults to your first master in the inventory file)
 #   to back the required PVCs. The application requires a PVC and the
@@ -55,26 +55,26 @@ openshift_cfme_storage_class: nfs
 # [OPTIONAL] - If you are using an EXTERNAL NFS server, such as a
 # netapp appliance, then you must set the hostname here. Leave the
 # value as 'false' if you are not using external NFS.
-openshift_cfme_storage_nfs_external_hostname: false
+openshift_management_storage_nfs_external_hostname: false
 # [OPTIONAL] - If you are using external NFS then you must set the base
 # path to the exports location here.
 #
 # Additionally: EXTERNAL NFS REQUIRES that YOU CREATE the nfs exports
 # that will back the application PV and optionally the database
 # pv. Export path definitions, relative to
-# {{ openshift_cfme_storage_nfs_base_dir }}
+# {{ openshift_management_storage_nfs_base_dir }}
 #
 # LOCAL NFS NOTE:
 #
 # You may may also change this value if you want to change the default
 # path used for local NFS exports.
-openshift_cfme_storage_nfs_base_dir: /exports
+openshift_management_storage_nfs_base_dir: /exports
 #
 # LOCAL NFS NOTE:
 #
 # You may override the automatically selected LOCAL NFS server by
 # setting this variable. Useful for testing specific task files.
-openshift_cfme_storage_nfs_local_hostname: false
+openshift_management_storage_nfs_local_hostname: false
 
 ######################################################################
 # SCAFFOLDING - These are parameters we pre-seed that a user may or
@@ -86,5 +86,5 @@ openshift_cfme_storage_nfs_local_hostname: false
 # under the .parameters list in files/miq-template{-ext-db}.yaml
 # Example:
 #
-# openshift_cfme_template_parameters={'APPLICATION_MEM_REQ': '512Mi'}
-openshift_cfme_template_parameters: {}
+# openshift_management_template_parameters={'APPLICATION_MEM_REQ': '512Mi'}
+openshift_management_template_parameters: {}

roles/openshift_cfme/files/templates/cloudforms/cfme-backup-job.yaml → roles/openshift_management/files/templates/cloudforms/cfme-backup-job.yaml


roles/openshift_cfme/files/templates/cloudforms/cfme-backup-pvc.yaml → roles/openshift_management/files/templates/cloudforms/cfme-backup-pvc.yaml


roles/openshift_cfme/files/templates/cloudforms/cfme-pv-backup-example.yaml → roles/openshift_management/files/templates/cloudforms/cfme-pv-backup-example.yaml


roles/openshift_cfme/files/templates/cloudforms/cfme-pv-db-example.yaml → roles/openshift_management/files/templates/cloudforms/cfme-pv-db-example.yaml


roles/openshift_cfme/files/templates/cloudforms/cfme-pv-server-example.yaml → roles/openshift_management/files/templates/cloudforms/cfme-pv-server-example.yaml


roles/openshift_cfme/files/templates/cloudforms/cfme-restore-job.yaml → roles/openshift_management/files/templates/cloudforms/cfme-restore-job.yaml


roles/openshift_cfme/files/templates/cloudforms/cfme-scc-sysadmin.yaml → roles/openshift_management/files/templates/cloudforms/cfme-scc-sysadmin.yaml


roles/openshift_cfme/files/templates/cloudforms/cfme-template-ext-db.yaml → roles/openshift_management/files/templates/cloudforms/cfme-template-ext-db.yaml


roles/openshift_cfme/files/templates/cloudforms/cfme-template.yaml → roles/openshift_management/files/templates/cloudforms/cfme-template.yaml


roles/openshift_cfme/files/templates/manageiq/miq-backup-job.yaml → roles/openshift_management/files/templates/manageiq/miq-backup-job.yaml


roles/openshift_cfme/files/templates/manageiq/miq-backup-pvc.yaml → roles/openshift_management/files/templates/manageiq/miq-backup-pvc.yaml


roles/openshift_cfme/files/templates/manageiq/miq-pv-backup-example.yaml → roles/openshift_management/files/templates/manageiq/miq-pv-backup-example.yaml


roles/openshift_cfme/files/templates/manageiq/miq-pv-db-example.yaml → roles/openshift_management/files/templates/manageiq/miq-pv-db-example.yaml


roles/openshift_cfme/files/templates/manageiq/miq-pv-server-example.yaml → roles/openshift_management/files/templates/manageiq/miq-pv-server-example.yaml


roles/openshift_cfme/files/templates/manageiq/miq-restore-job.yaml → roles/openshift_management/files/templates/manageiq/miq-restore-job.yaml


roles/openshift_cfme/files/templates/manageiq/miq-template-ext-db.yaml → roles/openshift_management/files/templates/manageiq/miq-template-ext-db.yaml


roles/openshift_cfme/files/templates/manageiq/miq-template.yaml → roles/openshift_management/files/templates/manageiq/miq-template.yaml


roles/openshift_cfme/handlers/main.yml → roles/openshift_management/handlers/main.yml


roles/openshift_cfme/meta/main.yml → roles/openshift_management/meta/main.yml


+ 7 - 7
roles/openshift_cfme/tasks/accounts.yml

@@ -3,16 +3,16 @@
 # and ensuring correct access is provided as required.
 - name: Ensure the CFME system accounts exist
   oc_serviceaccount:
-    namespace: "{{ openshift_cfme_project }}"
+    namespace: "{{ openshift_management_project }}"
     state: present
-    name: "{{ openshift_cfme_flavor_short }}{{ item.name }}"
+    name: "{{ openshift_management_flavor_short }}{{ item.name }}"
   with_items:
     - "{{ __openshift_system_account_sccs }}"
 
 - name: Ensure the CFME system accounts have all the required SCCs
   oc_adm_policy_user:
-    namespace: "{{ openshift_cfme_project }}"
-    user: "system:serviceaccount:{{ openshift_cfme_project }}:{{ openshift_cfme_flavor_short }}{{ item.name }}"
+    namespace: "{{ openshift_management_project }}"
+    user: "system:serviceaccount:{{ openshift_management_project }}:{{ openshift_management_flavor_short }}{{ item.name }}"
     resource_kind: scc
     resource_name: "{{ item.resource_name }}"
   with_items:
@@ -20,9 +20,9 @@
 
 - name: Ensure the CFME system accounts have the required roles
   oc_adm_policy_user:
-    namespace: "{{ openshift_cfme_project }}"
-    user: "system:serviceaccount:{{ openshift_cfme_project }}:{{ openshift_cfme_flavor_short }}{{ item.name }}"
+    namespace: "{{ openshift_management_project }}"
+    user: "system:serviceaccount:{{ openshift_management_project }}:{{ openshift_management_flavor_short }}{{ item.name }}"
     resource_kind: role
     resource_name: "{{ item.resource_name }}"
   with_items:
-    - "{{ __openshift_cfme_system_account_roles }}"
+    - "{{ __openshift_management_system_account_roles }}"

+ 19 - 19
roles/openshift_cfme/tasks/main.yml

@@ -5,11 +5,11 @@
 - name: Run pre-install CFME validation checks
   include: validate.yml
 
-- name: "Ensure the CFME '{{ openshift_cfme_project }}' namespace exists"
+- name: "Ensure the CFME '{{ openshift_management_project }}' namespace exists"
   oc_project:
     state: present
-    name: "{{ openshift_cfme_project }}"
-    display_name: "{{ openshift_cfme_project_description }}"
+    name: "{{ openshift_management_project }}"
+    display_name: "{{ openshift_management_project_description }}"
 
 - name: Create and Authorize CFME Accounts
   include: accounts.yml
@@ -20,28 +20,28 @@
 # * nfs - set up NFS shares on the first master for a proof of concept
 - name: Create required NFS exports for CFME app storage
   include: storage/nfs.yml
-  when: openshift_cfme_storage_class == 'nfs'
+  when: openshift_management_storage_class == 'nfs'
 
 #---------------------------------------------------------------------
 # * external - NFS again, but pointing to a pre-configured NFS server
 - name: Note Storage Type -  External NFS
   debug:
-    msg: "Setting up external NFS storage, openshift_cfme_storage_class is {{ openshift_cfme_storage_class }}"
-  when: openshift_cfme_storage_class == 'nfs_external'
+    msg: "Setting up external NFS storage, openshift_management_storage_class is {{ openshift_management_storage_class }}"
+  when: openshift_management_storage_class == 'nfs_external'
 
 #---------------------------------------------------------------------
 # * cloudprovider - use an existing cloudprovider based storage
 - name: Note Storage Type - Cloud Provider
   debug:
-    msg: Validating cloud provider storage type, openshift_cfme_storage_class is 'cloudprovider'
-  when: openshift_cfme_storage_class == 'cloudprovider'
+    msg: Validating cloud provider storage type, openshift_management_storage_class is 'cloudprovider'
+  when: openshift_management_storage_class == 'cloudprovider'
 
 #---------------------------------------------------------------------
 # * preconfigured - don't do anything, assume it's all there ready to go
 - name: Note Storage Type - Preconfigured
   debug:
-    msg: Skipping storage configuration, openshift_cfme_storage_class is 'preconfigured'
-  when: openshift_cfme_storage_class == 'preconfigured'
+    msg: Skipping storage configuration, openshift_management_storage_class is 'preconfigured'
+  when: openshift_management_storage_class == 'preconfigured'
 
 ######################################################################
 # APPLICATION TEMPLATE
@@ -52,28 +52,28 @@
 # APP & DB Storage
 
 # For local/external NFS backed installations
-- name: "Create the required App and DB PVs using {{ openshift_cfme_storage_class }}"
+- name: "Create the required App and DB PVs using {{ openshift_management_storage_class }}"
   include: storage/create_nfs_pvs.yml
   when:
-    - openshift_cfme_storage_class in ['nfs', 'nfs_external']
+    - openshift_management_storage_class in ['nfs', 'nfs_external']
 
 ######################################################################
 # CREATE APP
 - name: Note the correct ext-db template name
   set_fact:
-    openshift_cfme_template_name: "{{ openshift_cfme_flavor }}-ext-db"
+    openshift_management_template_name: "{{ openshift_management_flavor }}-ext-db"
   when:
-    - openshift_cfme_app_template in ['miq-template-ext-db', 'cfme-template-ext-db']
+    - openshift_management_app_template in ['miq-template-ext-db', 'cfme-template-ext-db']
 
 - name: Note the correct podified db template name
   set_fact:
-    openshift_cfme_template_name: "{{ openshift_cfme_flavor }}"
+    openshift_management_template_name: "{{ openshift_management_flavor }}"
   when:
-    - openshift_cfme_app_template in ['miq-template', 'cfme-template']
+    - openshift_management_app_template in ['miq-template', 'cfme-template']
 
 - name: Ensure the CFME App is created
   oc_process:
-    namespace: "{{ openshift_cfme_project }}"
-    template_name: "{{ openshift_cfme_template_name }}"
+    namespace: "{{ openshift_management_project }}"
+    template_name: "{{ openshift_management_template_name }}"
     create: True
-    params: "{{ openshift_cfme_template_parameters }}"
+    params: "{{ openshift_management_template_parameters }}"

+ 69 - 0
roles/openshift_management/tasks/storage/create_nfs_pvs.yml

@@ -0,0 +1,69 @@
+---
+# Create the required PVs for the App and the DB
+- name: Note the App PV Size from Template Parameters
+  set_fact:
+    openshift_management_app_pv_size: "{{ openshift_management_template_parameters.APPLICATION_VOLUME_CAPACITY }}"
+  when:
+    - openshift_management_template_parameters.APPLICATION_VOLUME_CAPACITY is defined
+
+- name: Note the App PV Size from defaults
+  set_fact:
+    openshift_management_app_pv_size: "{{ __openshift_management_app_pv_size }}"
+  when:
+    - openshift_management_template_parameters.APPLICATION_VOLUME_CAPACITY is not defined
+
+- when: openshift_management_app_template in ['miq-template', 'cfme-template']
+  block:
+    - name: Note the DB PV Size from Template Parameters
+      set_fact:
+        openshift_management_db_pv_size: "{{ openshift_management_template_parameters.DATABASE_VOLUME_CAPACITY }}"
+      when:
+        - openshift_management_template_parameters.DATABASE_VOLUME_CAPACITY is defined
+
+    - name: Note the DB PV Size from defaults
+      set_fact:
+        openshift_management_db_pv_size: "{{ __openshift_management_db_pv_size }}"
+      when:
+        - openshift_management_template_parameters.DATABASE_VOLUME_CAPACITY is not defined
+
+- name: Check if the CFME App PV has been created
+  oc_obj:
+    namespace: "{{ openshift_management_project }}"
+    state: list
+    kind: pv
+    name: "{{ openshift_management_flavor_short }}-app"
+  register: miq_app_pv_check
+
+- name: Check if the CFME DB PV has been created
+  oc_obj:
+    namespace: "{{ openshift_management_project }}"
+    state: list
+    kind: pv
+    name: "{{ openshift_management_flavor_short }}-db"
+  register: miq_db_pv_check
+  when:
+    - openshift_management_app_template in ['miq-template', 'cfme-template']
+
+- name: Ensure the CFME App PV is created
+  oc_process:
+    namespace: "{{ openshift_management_project }}"
+    template_name: "{{ openshift_management_flavor }}-app-pv"
+    create: True
+    params:
+      PV_SIZE: "{{ openshift_management_app_pv_size }}"
+      BASE_PATH: "{{ openshift_management_storage_nfs_base_dir }}"
+      NFS_HOST: "{{ openshift_management_nfs_server }}"
+  when: miq_app_pv_check.results.results == [{}]
+
+- name: Ensure the CFME DB PV is created
+  oc_process:
+    namespace: "{{ openshift_management_project }}"
+    template_name: "{{ openshift_management_flavor }}-db-pv"
+    create: True
+    params:
+      PV_SIZE: "{{ openshift_management_db_pv_size }}"
+      BASE_PATH: "{{ openshift_management_storage_nfs_base_dir }}"
+      NFS_HOST: "{{ openshift_management_nfs_server }}"
+  when:
+    - openshift_management_app_template in ['miq-template', 'cfme-template']
+    - miq_db_pv_check.results.results == [{}]

+ 67 - 0
roles/openshift_management/tasks/storage/nfs.yml

@@ -0,0 +1,67 @@
+---
+# 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_management_nfs_server: "{{ openshift_management_storage_nfs_local_hostname }}"
+  when:
+    - openshift_management_storage_nfs_local_hostname is defined
+    - openshift_management_storage_nfs_local_hostname != False
+    - openshift_management_storage_class == "nfs"
+
+- name: Ensure we save the local NFS server
+  set_fact:
+    openshift_management_nfs_server: "{{ groups['oo_nfs_to_config'].0 }}"
+  when:
+    - openshift_management_nfs_server is not defined
+    - openshift_management_storage_class == "nfs"
+
+- name: Ensure we save the external NFS server
+  set_fact:
+    openshift_management_nfs_server: "{{ openshift_management_storage_nfs_external_hostname }}"
+  when:
+    - openshift_management_storage_class == "nfs_external"
+
+- name: Failed NFS server detection
+  assert:
+    that:
+      - openshift_management_nfs_server is defined
+    msg: |
+      "Unable to detect an NFS server. The 'nfs_external'
+      openshift_management_storage_class option requires that you set
+      openshift_management_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_management_storage_nfs_base_dir }}"
+
+    - name: Create the App export
+      include_role:
+        role: openshift_nfs
+        tasks_from: create_export
+      vars:
+        l_nfs_base_dir: "{{ openshift_management_storage_nfs_base_dir }}"
+        l_nfs_export_config: "{{ openshift_management_flavor_short }}"
+        l_nfs_export_name: "{{ openshift_management_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_management_storage_nfs_base_dir }}"
+        l_nfs_export_config: "{{ openshift_management_flavor_short }}"
+        l_nfs_export_name: "{{ openshift_management_flavor_short }}-db"
+        l_nfs_options: "*(rw,no_root_squash,no_wdelay)"
+      when:
+        - openshift_management_app_template in ['miq-template', 'cfme-template']
+
+  delegate_to: "{{ openshift_management_nfs_server }}"

roles/openshift_cfme/tasks/storage/storage.yml → roles/openshift_management/tasks/storage/storage.yml


+ 27 - 27
roles/openshift_cfme/tasks/template.yml

@@ -13,59 +13,59 @@
 
 ######################################################################
 # STANDARD PODIFIED DATABASE TEMPLATE
-- when: openshift_cfme_app_template in ['miq-template', 'cfme-template']
+- when: openshift_management_app_template in ['miq-template', 'cfme-template']
   block:
   - name: Check if the CFME Server template has been created already
     oc_obj:
-      namespace: "{{ openshift_cfme_project }}"
+      namespace: "{{ openshift_management_project }}"
       state: list
       kind: template
-      name: "{{ openshift_cfme_flavor }}"
+      name: "{{ openshift_management_flavor }}"
     register: miq_server_check
 
   - when: miq_server_check.results.results == [{}]
     block:
     - name: Copy over CFME Server template
       copy:
-        src: "templates/{{ openshift_cfme_flavor }}/{{ openshift_cfme_flavor_short }}-template.yaml"
+        src: "templates/{{ openshift_management_flavor }}/{{ openshift_management_flavor_short }}-template.yaml"
         dest: "{{ template_dir }}/"
 
     - name: Ensure CFME Server Template is created
       oc_obj:
-        namespace: "{{ openshift_cfme_project }}"
-        name: "{{ openshift_cfme_flavor }}"
+        namespace: "{{ openshift_management_project }}"
+        name: "{{ openshift_management_flavor }}"
         state: present
         kind: template
         files:
-        - "{{ template_dir }}/{{ openshift_cfme_flavor_short }}-template.yaml"
+        - "{{ template_dir }}/{{ openshift_management_flavor_short }}-template.yaml"
 
 ######################################################################
 # EXTERNAL DATABASE TEMPLATE
-- when: openshift_cfme_app_template in ['miq-template-ext-db', 'cfme-template']
+- when: openshift_management_app_template in ['miq-template-ext-db', 'cfme-template']
   block:
   - name: Check if the CFME Ext-DB Server template has been created already
     oc_obj:
-      namespace: "{{ openshift_cfme_project }}"
+      namespace: "{{ openshift_management_project }}"
       state: list
       kind: template
-      name: "{{ openshift_cfme_flavor }}-ext-db"
+      name: "{{ openshift_management_flavor }}-ext-db"
     register: miq_ext_db_server_check
 
   - when: miq_ext_db_server_check.results.results == [{}]
     block:
     - name: Copy over CFME Ext-DB Server template
       copy:
-        src: "templates/{{ openshift_cfme_flavor }}/{{openshift_cfme_flavor_short}}-template-ext-db.yaml"
+        src: "templates/{{ openshift_management_flavor }}/{{openshift_management_flavor_short}}-template-ext-db.yaml"
         dest: "{{ template_dir }}/"
 
     - name: Ensure CFME Ext-DB Server Template is created
       oc_obj:
-        namespace: "{{ openshift_cfme_project }}"
-        name: "{{ openshift_cfme_flavor }}-ext-db"
+        namespace: "{{ openshift_management_project }}"
+        name: "{{ openshift_management_flavor }}-ext-db"
         state: present
         kind: template
         files:
-        - "{{ template_dir }}/{{ openshift_cfme_flavor_short }}-template-ext-db.yaml"
+        - "{{ template_dir }}/{{ openshift_management_flavor_short }}-template-ext-db.yaml"
 
 # End app template creation.
 ######################################################################
@@ -76,53 +76,53 @@
 # Required for the application server
 - name: Check if the CFME App PV template has been created already
   oc_obj:
-    namespace: "{{ openshift_cfme_project }}"
+    namespace: "{{ openshift_management_project }}"
     state: list
     kind: template
-    name: "{{ openshift_cfme_flavor }}-app-pv"
+    name: "{{ openshift_management_flavor }}-app-pv"
   register: miq_app_pv_check
 
 - when: miq_app_pv_check.results.results == [{}]
   block:
   - name: Copy over CFME App PV template
     copy:
-      src: "templates/{{ openshift_cfme_flavor }}/{{ openshift_cfme_flavor_short }}-pv-server-example.yaml"
+      src: "templates/{{ openshift_management_flavor }}/{{ openshift_management_flavor_short }}-pv-server-example.yaml"
       dest: "{{ template_dir }}/"
 
   - name: Ensure CFME App PV Template is created
     oc_obj:
-      namespace: "{{ openshift_cfme_project }}"
-      name: "{{ openshift_cfme_flavor }}-app-pv"
+      namespace: "{{ openshift_management_project }}"
+      name: "{{ openshift_management_flavor }}-app-pv"
       state: present
       kind: template
       files:
-      - "{{ template_dir }}/{{ openshift_cfme_flavor_short }}-pv-server-example.yaml"
+      - "{{ template_dir }}/{{ openshift_management_flavor_short }}-pv-server-example.yaml"
 
 #---------------------------------------------------------------------
 
 # Required for database if the installation is fully podified
-- when: openshift_cfme_app_template in ['miq-template', 'cfme-template']
+- when: openshift_management_app_template in ['miq-template', 'cfme-template']
   block:
   - name: Check if the CFME DB PV template has been created already
     oc_obj:
-      namespace: "{{ openshift_cfme_project }}"
+      namespace: "{{ openshift_management_project }}"
       state: list
       kind: template
-      name: "{{ openshift_cfme_flavor }}-db-pv"
+      name: "{{ openshift_management_flavor }}-db-pv"
     register: miq_db_pv_check
 
   - when: miq_db_pv_check.results.results == [{}]
     block:
     - name: Copy over CFME DB PV template
       copy:
-        src: "templates/{{ openshift_cfme_flavor }}/{{ openshift_cfme_flavor_short }}-pv-db-example.yaml"
+        src: "templates/{{ openshift_management_flavor }}/{{ openshift_management_flavor_short }}-pv-db-example.yaml"
         dest: "{{ template_dir }}/"
 
     - name: Ensure CFME DB PV Template is created
       oc_obj:
-        namespace: "{{ openshift_cfme_project }}"
-        name: "{{ openshift_cfme_flavor }}-db-pv"
+        namespace: "{{ openshift_management_project }}"
+        name: "{{ openshift_management_flavor }}-db-pv"
         state: present
         kind: template
         files:
-        - "{{ template_dir }}/{{ openshift_cfme_flavor_short }}-pv-db-example.yaml"
+        - "{{ template_dir }}/{{ openshift_management_flavor_short }}-pv-db-example.yaml"

+ 3 - 3
roles/openshift_cfme/tasks/uninstall.yml

@@ -1,6 +1,6 @@
 ---
 - name: Start removing all the objects
-  command: "oc delete -n {{ openshift_cfme_project }} {{ item }} --all"
+  command: "oc delete -n {{ openshift_management_project }} {{ item }} --all"
   with_items:
     - rc
     - dc
@@ -12,10 +12,10 @@
     - routes
 
 - name: Remove the project
-  command: "oc delete -n {{ openshift_cfme_project }} project {{ openshift_cfme_project }}"
+  command: "oc delete -n {{ openshift_management_project }} project {{ openshift_management_project }}"
 
 - name: Verify project has been destroyed
-  command: "oc get project {{ openshift_cfme_project }}"
+  command: "oc get project {{ openshift_management_project }}"
   ignore_errors: True
   register: project_terminated
   until: project_terminated.stderr.find("NotFound") != -1

+ 23 - 23
roles/openshift_cfme/tasks/validate.yml

@@ -1,49 +1,49 @@
 ---
-# Validate configuration parameters passed to the openshift_cfme role
+# Validate configuration parameters passed to the openshift_management role
 
 ######################################################################
 # CORE PARAMETERS
-- name: Ensure openshift_cfme_app_template is valid
+- name: Ensure openshift_management_app_template is valid
   assert:
     that:
-      - openshift_cfme_app_template in __openshift_cfme_app_templates
+      - openshift_management_app_template in __openshift_management_app_templates
 
     msg: |
-      "openshift_cfme_app_template must be one of {{
-      __openshift_cfme_app_templates | join(', ') }}"
+      "openshift_management_app_template must be one of {{
+      __openshift_management_app_templates | join(', ') }}"
 
-- name: Ensure openshift_cfme_storage_class is a valid type
+- name: Ensure openshift_management_storage_class is a valid type
   assert:
     that:
-      - openshift_cfme_storage_class in __openshift_cfme_storage_classes
+      - openshift_management_storage_class in __openshift_management_storage_classes
     msg: |
-      "openshift_cfme_storage_class must be one of {{
-      __openshift_cfme_storage_classes | join(', ') }}"
+      "openshift_management_storage_class must be one of {{
+      __openshift_management_storage_classes | join(', ') }}"
 
 ######################################################################
 # STORAGE PARAMS - NFS
 - name: Ensure external NFS storage has a valid NFS server hostname defined
   assert:
     that:
-      - openshift_cfme_storage_nfs_external_hostname | default(False)
+      - openshift_management_storage_nfs_external_hostname | default(False)
     msg: |
       The selected storage class 'nfs_external' requires a valid
-      hostname for the openshift_cfme_storage_nfs_hostname parameter
+      hostname for the openshift_management_storage_nfs_hostname parameter
   when:
-    - openshift_cfme_storage_class == 'nfs_external'
+    - openshift_management_storage_class == 'nfs_external'
 
 - name: Ensure local NFS storage has a valid NFS server to use
   fail:
     msg: |
       No NFS hosts detected or defined but storage class is set to
       'nfs'. Add hosts to your [nfs] group or define one manually with
-      the 'openshift_cfme_storage_nfs_local_hostname' parameter
+      the 'openshift_management_storage_nfs_local_hostname' parameter
   when:
-    - openshift_cfme_storage_class == 'nfs'
+    - openshift_management_storage_class == 'nfs'
     # You haven't created any NFS groups
     - (groups.nfs is defined and groups.nfs | length == 0) or (groups.nfs is not defined)
     # You did not manually specify a host to use
-    - (openshift_cfme_storage_nfs_local_hostname is not defined) or (openshift_cfme_storage_nfs_local_hostname == false)
+    - (openshift_management_storage_nfs_local_hostname is not defined) or (openshift_management_storage_nfs_local_hostname == false)
 
 ######################################################################
 # STORAGE PARAMS  -CLOUD PROVIDER
@@ -52,13 +52,13 @@
     that:
       - openshift_cloudprovider_kind == 'aws' or openshift_cloudprovider_kind == 'gce'
     msg: |
-      openshift_cfme_storage_class is 'cloudprovider' but you have an
+      openshift_management_storage_class is 'cloudprovider' but you have an
       invalid kind defined, '{{ openshift_cloudprovider_kind }}'. See
       'openshift_cloudprovider_kind' in the example inventories for
       the required parameters for your selected cloud
       provider. Working providers: 'aws' and 'gce'.
   when:
-    - openshift_cfme_storage_class == 'cloudprovider'
+    - openshift_management_storage_class == 'cloudprovider'
     - openshift_cloudprovider_kind is defined
 
 - name: Validate 'cloudprovider' Storage Class has required parameters defined
@@ -66,25 +66,25 @@
     that:
       - openshift_cloudprovider_kind is defined
     msg: |
-      openshift_cfme_storage_class is 'cloudprovider' but you do not
+      openshift_management_storage_class is 'cloudprovider' but you do not
       have 'openshift_cloudprovider_kind' defined, this is
       required. Search the example inventories for
       'openshift_cloudprovider_kind'. The required parameters for your
       selected cloud provider must be defined in your inventory as
       well. Working providers: 'aws' and 'gce'.
   when:
-    - openshift_cfme_storage_class == 'cloudprovider'
+    - openshift_management_storage_class == 'cloudprovider'
 
 ######################################################################
 # DATABASE CONNECTION VALIDATION
 - name: Validate all required database parameters were provided for ext-db template
   assert:
     that:
-      - item in openshift_cfme_template_parameters
+      - item in openshift_management_template_parameters
     msg: |
       "You are using external database services but a required
       database parameter {{ item }} was not found in
-      'openshift_cfme_template_parameters'"
-  with_items: "{{ __openshift_cfme_required_db_conn_params }}"
+      'openshift_management_template_parameters'"
+  with_items: "{{ __openshift_management_required_db_conn_params }}"
   when:
-    - openshift_cfme_app_template in ['miq-template-ext-db', 'cfme-template-ext-db']
+    - openshift_management_app_template in ['miq-template-ext-db', 'cfme-template-ext-db']

+ 13 - 13
roles/openshift_cfme/vars/main.yml

@@ -2,7 +2,7 @@
 # Misc enumerated values
 #---------------------------------------------------------------------
 # Allowed choices for the storage class parameter
-__openshift_cfme_storage_classes:
+__openshift_management_storage_classes:
   - nfs
   - nfs_external
   - preconfigured
@@ -11,19 +11,19 @@ __openshift_cfme_storage_classes:
 #---------------------------------------------------------------------
 # DEFAULT PV SIZES
 # How large to make the MIQ application PV
-__openshift_cfme_app_pv_size: 5Gi
+__openshift_management_app_pv_size: 5Gi
 # How large to make the MIQ PostgreSQL PV
-__openshift_cfme_db_pv_size: 15Gi
+__openshift_management_db_pv_size: 15Gi
 
 # Name of the application templates with object/parameter definitions
-__openshift_cfme_app_templates:
+__openshift_management_app_templates:
   - miq-template-ext-db
   - miq-template
   - cfme-template-ext-db
   - cfme-template
 
 # PostgreSQL database connection parameters
-__openshift_cfme_db_parameters:
+__openshift_management_db_parameters:
   - DATABASE_USER
   - DATABASE_PASSWORD
   - DATABASE_IP
@@ -31,13 +31,13 @@ __openshift_cfme_db_parameters:
   - DATABASE_NAME
 
 # # Commented out until we can support both CFME and MIQ
-# # openshift_cfme_flavor: "{{ 'cloudforms' if openshift_deployment_type == 'openshift-enterprise' else 'manageiq' }}"
-#openshift_cfme_flavor: cloudforms
-openshift_cfme_flavor: manageiq
+# # openshift_management_flavor: "{{ 'cloudforms' if openshift_deployment_type == 'openshift-enterprise' else 'manageiq' }}"
+#openshift_management_flavor: cloudforms
+openshift_management_flavor: manageiq
 # TODO: Make this conditional as well based on the prior variable
-# # openshift_cfme_flavor_short: "{{ 'cfme' if openshift_deployment_type == 'openshift-enterprise' else 'miq' }}"
-# openshift_cfme_flavor_short: cfme
-openshift_cfme_flavor_short: miq
+# # openshift_management_flavor_short: "{{ 'cfme' if openshift_deployment_type == 'openshift-enterprise' else 'miq' }}"
+# openshift_management_flavor_short: cfme
+openshift_management_flavor_short: miq
 
 ######################################################################
 # ACCOUNTING
@@ -54,7 +54,7 @@ __openshift_system_account_sccs:
     resource_name: anyuid
 
 # Service Account Roles
-__openshift_cfme_system_account_roles:
+__openshift_management_system_account_roles:
   - name: -orchestrator
     resource_name: view
   - name: -orchestrator
@@ -68,7 +68,7 @@ __openshift_cfme_system_account_roles:
 # the final connection structure.
 #
 # TODO: Update user provided configs with this if they are missing fields
-__openshift_cfme_required_db_conn_params:
+__openshift_management_required_db_conn_params:
   - DATABASE_USER
   - DATABASE_PASSWORD
   - DATABASE_IP