summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master/tasks
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-11-16 16:01:54 -0500
committerJason DeTiberus <jdetiber@redhat.com>2015-11-23 11:33:41 -0500
commit3cbe7df8461e5514773e416d137980ce9bedf33d (patch)
treeb3dddcc0a4004fa09fae262c0a9385c7ed73796f /roles/openshift_master/tasks
parent8e979def0a56b40ab8a3acbd2e1a146457a5aaa6 (diff)
downloadopenshift-3cbe7df8461e5514773e416d137980ce9bedf33d.tar.gz
openshift-3cbe7df8461e5514773e416d137980ce9bedf33d.tar.bz2
openshift-3cbe7df8461e5514773e416d137980ce9bedf33d.tar.xz
openshift-3cbe7df8461e5514773e416d137980ce9bedf33d.zip
Refactor master identity provider configuration
- Remote template in favor of a filter plugin - Add additional validation for identity provider config - Add mappingMethod attribute for identity providers, default to 'claim'
Diffstat (limited to 'roles/openshift_master/tasks')
-rw-r--r--roles/openshift_master/tasks/main.yml16
1 files changed, 11 insertions, 5 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 185bfb8f3..ed174dbfc 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -1,13 +1,16 @@
---
-# TODO: add validation for openshift_master_identity_providers
# TODO: add ability to configure certificates given either a local file to
# point to or certificate contents, set in default cert locations.
-- assert:
- that:
- - openshift_master_oauth_grant_method in openshift_master_valid_grant_methods
- when: openshift_master_oauth_grant_method is defined
+# Authentication Variable Validation
+# TODO: validate the different identity provider kinds as well
+- fail:
+ msg: >
+ Invalid OAuth grant method: {{ openshift_master_oauth_grant_method }}
+ when: openshift_master_oauth_grant_method is defined and openshift_master_oauth_grant_method not in openshift_master_valid_grant_methods
+
+# HA Variable Validation
- fail:
msg: "openshift_master_cluster_method must be set to either 'native' or 'pacemaker' for multi-master installations"
when: openshift_master_ha | bool and ((openshift_master_cluster_method is not defined) or (openshift_master_cluster_method is defined and openshift_master_cluster_method not in ["native", "pacemaker"]))
@@ -172,6 +175,9 @@
- restart master
- restart master api
+- set_fact:
+ translated_identity_providers: "{{ openshift_master_identity_providers | translate_idps('v1') }}"
+
# TODO: add the validate parameter when there is a validation command to run
- name: Create master config
template: