Browse Source

Cleanup ansible_service_broker_image

Remove prefix and version variables for ansible_service_broker_image.

ansible_service_broker_image now utilizes oreg_url, or sensible
default values.

Also, cleanup unused ansible_service_broker_etcd* vars.
Michael Gugino 6 năm trước cách đây
mục cha
commit
98d154ad98

+ 9 - 0
roles/ansible_service_broker/defaults/main.yml

@@ -21,3 +21,12 @@ ansible_service_broker_image_pull_policy: Always
 ansible_service_broker_sandbox_role: edit
 ansible_service_broker_auto_escalate: false
 ansible_service_broker_local_registry_whitelist: []
+
+l_asb_default_images_dict:
+  origin: 'docker.io/ansibleplaybookbundle/origin-ansible-service-broker:latest'
+  openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-ansible-service-broker:${version}'
+
+l_asb_default_images_default: "{{ l_asb_default_images_dict[openshift_deployment_type] }}"
+l_asb_image_url: "{{ oreg_url | default(l_asb_default_images_default) | regex_replace('${version}' | regex_escape, openshift_image_tag) }}"
+
+ansible_service_broker_image: "{{ l_asb_image_url | regex_replace('${component}' | regex_escape, 'ansible-service-broker') }}"

+ 0 - 9
roles/ansible_service_broker/tasks/facts.yml

@@ -8,9 +8,6 @@
 
 - name: set ansible_service_broker facts
   set_fact:
-    ansible_service_broker_image_prefix: "{{ ansible_service_broker_image_prefix | default(__ansible_service_broker_image_prefix) }}"
-    ansible_service_broker_image_tag: "{{ ansible_service_broker_image_tag | default(__ansible_service_broker_image_tag) }}"
-
     ansible_service_broker_registry_type: "{{ ansible_service_broker_registry_type | default(__ansible_service_broker_registry_type) }}"
     ansible_service_broker_registry_name: "{{ ansible_service_broker_registry_name | default(__ansible_service_broker_registry_name) }}"
     ansible_service_broker_registry_url: "{{ ansible_service_broker_registry_url | default(__ansible_service_broker_registry_url) }}"
@@ -20,10 +17,4 @@
     ansible_service_broker_registry_tag: "{{ ansible_service_broker_registry_tag | default(__ansible_service_broker_registry_tag) }}"
     ansible_service_broker_registry_whitelist: "{{ ansible_service_broker_registry_whitelist | default(__ansible_service_broker_registry_whitelist) }}"
 
-- name: set ansible-service-broker image facts using set prefix and tag
-  set_fact:
-    ansible_service_broker_image: '{{ ansible_service_broker_image | default(__ansible_service_broker_image) }}'
-  vars:
-    __ansible_service_broker_image: "{{ ansible_service_broker_image_prefix }}ansible-service-broker:{{ ansible_service_broker_image_tag }}"
-
 - include_tasks: validate_facts.yml

+ 0 - 8
roles/ansible_service_broker/vars/default_images.yml

@@ -1,12 +1,4 @@
 ---
-
-__ansible_service_broker_image_prefix: ansibleplaybookbundle/origin-
-__ansible_service_broker_image_tag: latest
-
-__ansible_service_broker_etcd_image_prefix: quay.io/coreos/
-__ansible_service_broker_etcd_image_tag: latest
-__ansible_service_broker_etcd_image_etcd_path: /usr/local/bin/etcd
-
 __ansible_service_broker_registry_type: dockerhub
 __ansible_service_broker_registry_name: dh
 __ansible_service_broker_registry_url: null

+ 0 - 9
roles/ansible_service_broker/vars/openshift-enterprise.yml

@@ -1,13 +1,4 @@
 ---
-
-__ansible_service_broker_image_prefix: registry.access.redhat.com/openshift3/ose-
-__ansible_service_broker_image_tag: "{{ openshift_image_tag }}"
-
-__ansible_service_broker_etcd_image_prefix: registry.access.redhat.com/rhel7/
-__ansible_service_broker_etcd_image_tag: latest
-__ansible_service_broker_etcd_image_etcd_path: /bin/etcd
-
-
 __ansible_service_broker_registry_type: rhcc
 __ansible_service_broker_registry_name: rh
 __ansible_service_broker_registry_url: "https://registry.access.redhat.com"