summaryrefslogtreecommitdiffstats
path: root/roles/openshift_management/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_management/tasks')
-rw-r--r--roles/openshift_management/tasks/add_container_provider.yml14
-rw-r--r--roles/openshift_management/tasks/validate.yml15
2 files changed, 27 insertions, 2 deletions
diff --git a/roles/openshift_management/tasks/add_container_provider.yml b/roles/openshift_management/tasks/add_container_provider.yml
index 383e6edb5..50a5252cc 100644
--- a/roles/openshift_management/tasks/add_container_provider.yml
+++ b/roles/openshift_management/tasks/add_container_provider.yml
@@ -10,6 +10,18 @@
- name: Ensure OpenShift facts are loaded
openshift_facts:
+- name: Ensure we use openshift_master_cluster_public_hostname if it is available
+ set_fact:
+ l_cluster_hostname: "{{ openshift.master.cluster_public_hostname }}"
+ when:
+ - openshift.master.cluster_public_hostname is defined
+
+- name: Ensure we default to the first master if openshift_master_cluster_public_hostname is unavailable
+ set_fact:
+ l_cluster_hostname: "{{ openshift.master.cluster_hostname }}"
+ when:
+ - l_cluster_hostname is not defined
+
- name: Ensure the management SA Secrets are read
oc_serviceaccount_secret:
state: list
@@ -59,7 +71,7 @@
connection_configurations:
- authentication: {auth_key: "{{ management_bearer_token }}", authtype: bearer, type: AuthToken}
endpoint: {role: default, security_protocol: ssl-without-validation, verify_ssl: 0}
- hostname: "{{ openshift.master.cluster_public_hostname }}"
+ hostname: "{{ l_cluster_hostname }}"
name: "{{ openshift_management_project }}"
port: "{{ openshift.master.api_port }}"
type: "ManageIQ::Providers::Openshift::ContainerManager"
diff --git a/roles/openshift_management/tasks/validate.yml b/roles/openshift_management/tasks/validate.yml
index 8b20bdc5e..b22f36a4f 100644
--- a/roles/openshift_management/tasks/validate.yml
+++ b/roles/openshift_management/tasks/validate.yml
@@ -2,12 +2,25 @@
# Validate configuration parameters passed to the openshift_management role
######################################################################
+# BETA ACKNOWLEDGEMENT
+- name: Ensure BETA software notice has been acknowledged
+ assert:
+ that:
+ - openshift_management_install_beta | default(false) | bool
+ msg: |
+ openshift-management (CFME/MIQ) is currently BETA status. You
+ must set openshift_management_install_beta to true to
+ acknowledge that you accept this risk and understand that
+ support is limited or nonexistent.
+ when:
+ - openshift_deployment_type == 'openshift-enterprise'
+
+######################################################################
# CORE PARAMETERS
- name: Ensure openshift_management_app_template is valid
assert:
that:
- openshift_management_app_template in __openshift_management_app_templates
-
msg: |
"openshift_management_app_template must be one of {{
__openshift_management_app_templates | join(', ') }}"