|
@@ -49,18 +49,32 @@
|
|
|
######################################################################
|
|
|
# Begin image streams
|
|
|
|
|
|
-- name: Create imagestream import secret
|
|
|
+- name: Create imagestream import secret for oreg_url
|
|
|
command: >
|
|
|
- {{ openshift_client_binary }} create secret docker-registry imagestreamsecret --docker-server={{ registry_host }} --docker-username={{ oreg_auth_user }} --docker-email=openshift@openshift.com --docker-password={{ oreg_auth_password }} --config={{ openshift.common.config_base }}/master/admin.kubeconfig -n openshift
|
|
|
+ {{ openshift_client_binary }} create secret docker-registry imagestreamsecret
|
|
|
+ --docker-server={{ registry_host }} --docker-username={{ oreg_auth_user }}
|
|
|
+ --docker-email=openshift@openshift.com --docker-password={{ oreg_auth_password }}
|
|
|
+ --config={{ openshift.common.config_base }}/master/admin.kubeconfig -n openshift
|
|
|
when:
|
|
|
- openshift_examples_load_rhel | bool
|
|
|
- oreg_auth_password is defined
|
|
|
- with_items:
|
|
|
- - "{{ rhel_image_streams }}"
|
|
|
register: oex_imagestream_import_secret
|
|
|
failed_when: "'already exists' not in oex_imagestream_import_secret.stderr and oex_imagestream_import_secret.rc != 0"
|
|
|
changed_when: false
|
|
|
|
|
|
+- name: Create imagestream import secrets for any additional registries
|
|
|
+ command: >
|
|
|
+ {{ openshift_client_binary }} create secret docker-registry imagestreamsecret
|
|
|
+ --docker-server={{ item.host }} --docker-username={{ item.user }}
|
|
|
+ --docker-email=openshift@openshift.com --docker-password={{ item.password }}
|
|
|
+ --config={{ openshift.common.config_base }}/master/admin.kubeconfig -n openshift
|
|
|
+ when:
|
|
|
+ - openshift_additional_registry_credentials is defined
|
|
|
+ with_items:
|
|
|
+ - "{{ openshift_additional_registry_credentials }}"
|
|
|
+ register: oex_additional_creds
|
|
|
+ failed_when: "'already exists' not in oex_additional_creds.stderr and oex_additional_creds.rc != 0"
|
|
|
+
|
|
|
- name: Modify registry paths if registry_url is not registry.redhat.io
|
|
|
shell: >
|
|
|
find {{ examples_base }} -type f | xargs -n 1 sed -i 's|registry.redhat.io|{{ registry_host | quote }}|g'
|