summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-01-18 11:44:55 -0800
committerGitHub <noreply@github.com>2018-01-18 11:44:55 -0800
commit1a2a895356df638756d2117e3d324710167737db (patch)
treeca5844367aef913fd00caea468d6bcbf74bcdf74 /roles
parent2efead33407ed6124eae589026d3ba539a6bd8e5 (diff)
parented2c7ad8e2c00b696094cd20891822454eb02cdb (diff)
downloadopenshift-1a2a895356df638756d2117e3d324710167737db.tar.gz
openshift-1a2a895356df638756d2117e3d324710167737db.tar.bz2
openshift-1a2a895356df638756d2117e3d324710167737db.tar.xz
openshift-1a2a895356df638756d2117e3d324710167737db.zip
Merge pull request #6745 from shawn-hurley/secret-reg-auth
Automatic merge from submit-queue. Bug 1509082 - Adding auth as a secret If username and password are defined we should use a secret for the credentials.
Diffstat (limited to 'roles')
-rw-r--r--roles/ansible_service_broker/tasks/install.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/ansible_service_broker/tasks/install.yml b/roles/ansible_service_broker/tasks/install.yml
index 1bc1b5e43..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,6 +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: "{{ ansible_service_broker_registry_auth_type | default("") }}"
+ auth_name: "{{ ansible_service_broker_registry_auth_name | default("") }}"
- type: local_openshift
name: localregistry
namespaces: ['openshift']
@@ -447,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: