|
|
|
@ -66,6 +66,30 @@ |
|
|
|
when: item|regex_search('-ephemeral$') |
|
|
|
with_items: '{{ oc_get_templates.stdout_lines }}' |
|
|
|
|
|
|
|
- name: Get a list of currently installed image streams |
|
|
|
command: oc get is -n openshift -o name |
|
|
|
register: oc_get_is |
|
|
|
|
|
|
|
- name: Delete unwanted image streams |
|
|
|
command: oc delete {{ item }} -n openshift |
|
|
|
when: item|regex_search('(datagrid|datavirt|decisionserver|eap64|processserver|tomcat7)') |
|
|
|
with_items: '{{ oc_get_is.stdout_lines }}' |
|
|
|
|
|
|
|
- name: Get a list of the remaining image streams |
|
|
|
command: oc get is -n openshift -o name |
|
|
|
register: oc_get_is |
|
|
|
|
|
|
|
- name: Update each image stream |
|
|
|
command: oc import-image {{ item }} --confirm --scheduled --all -n openshift |
|
|
|
with_items: '{{ oc_get_is.stdout_lines }}' |
|
|
|
|
|
|
|
- name: Import additional Red Hat image streams |
|
|
|
command: oc import-image -n openshift {{ item.key }} --from {{ item.value }} --confirm --scheduled --all |
|
|
|
with_dict: |
|
|
|
rhel-atomic: rhel-atomic |
|
|
|
rhel: rhel7.4 |
|
|
|
when: '(''imagestreams/'' ~ item.key) not in oc_get_is.stdout_lines' |
|
|
|
|
|
|
|
- name: Delete the temporary directory |
|
|
|
file: |
|
|
|
path: '{{ tempfile.path }}' |
|
|
|
|