summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorShawn Hurley <shawn.hurley21@gmail.com>2018-01-16 14:00:18 -0500
committerShawn Hurley <shawn.hurley21@gmail.com>2018-01-16 14:46:00 -0500
commited2c7ad8e2c00b696094cd20891822454eb02cdb (patch)
tree37ec1ff55804fd6101a68c0c0e5cf71160376313 /roles
parent63494ced32e54a48181ff988a7ef5f9c6c50d469 (diff)
downloadopenshift-ed2c7ad8e2c00b696094cd20891822454eb02cdb.tar.gz
openshift-ed2c7ad8e2c00b696094cd20891822454eb02cdb.tar.bz2
openshift-ed2c7ad8e2c00b696094cd20891822454eb02cdb.tar.xz
openshift-ed2c7ad8e2c00b696094cd20891822454eb02cdb.zip
adding check if secret auth is needed
Diffstat (limited to 'roles')
-rw-r--r--roles/ansible_service_broker/tasks/install.yml10
1 files changed, 8 insertions, 2 deletions
diff --git a/roles/ansible_service_broker/tasks/install.yml b/roles/ansible_service_broker/tasks/install.yml
index 47dac7f48..f869b5fae 100644
--- a/roles/ansible_service_broker/tasks/install.yml
+++ b/roles/ansible_service_broker/tasks/install.yml
@@ -375,6 +375,11 @@
secret:
secretName: etcd-auth-secret
+- name: set auth name and type facts if needed
+ set_fact:
+ ansible_service_broker_registry_auth_type: "secret"
+ ansible_service_broker_registry_auth_name: "asb-registry-auth"
+ when: ansible_service_broker_registry_user != "" and ansible_service_broker_registry_password != ""
# TODO: saw a oc_configmap in the library, but didn't understand how to get it to do the following:
- name: Create config map for ansible-service-broker
@@ -402,8 +407,8 @@
org: {{ ansible_service_broker_registry_organization }}
tag: {{ ansible_service_broker_registry_tag }}
white_list: {{ ansible_service_broker_registry_whitelist | to_yaml }}
- auth_type: secret
- auth_name: asb-registry-auth
+ auth_type: "{{ ansible_service_broker_registry_auth_type | default("") }}"
+ auth_name: "{{ ansible_service_broker_registry_auth_name | default("") }}"
- type: local_openshift
name: localregistry
namespaces: ['openshift']
@@ -449,6 +454,7 @@
data: "{{ ansible_service_broker_registry_user }}"
- path: password
data: "{{ ansible_service_broker_registry_password }}"
+ when: ansible_service_broker_registry_user != "" and ansible_service_broker_registry_password != ""
- name: Create the Broker resource in the catalog
oc_obj: