summaryrefslogtreecommitdiffstats
path: root/roles/openshift_examples/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_examples/tasks/main.yml')
-rw-r--r--roles/openshift_examples/tasks/main.yml19
1 files changed, 18 insertions, 1 deletions
diff --git a/roles/openshift_examples/tasks/main.yml b/roles/openshift_examples/tasks/main.yml
index 8d2248578..4150fabec 100644
--- a/roles/openshift_examples/tasks/main.yml
+++ b/roles/openshift_examples/tasks/main.yml
@@ -49,8 +49,10 @@
# RHEL and Centos image streams are mutually exclusive
- name: Import RHEL streams
command: >
- {{ openshift.common.client_binary }} {{ openshift_examples_import_command }} -n openshift -f {{ rhel_image_streams }}
+ {{ openshift.common.client_binary }} {{ openshift_examples_import_command }} -n openshift -f {{ item }}
when: openshift_examples_load_rhel | bool
+ with_items:
+ - "{{ rhel_image_streams }}"
register: oex_import_rhel_streams
failed_when: "'already exists' not in oex_import_rhel_streams.stderr and oex_import_rhel_streams.rc != 0"
changed_when: false
@@ -95,6 +97,21 @@
failed_when: "'already exists' not in oex_import_infrastructure.stderr and oex_import_infrastructure.rc != 0"
changed_when: false
+- name: Remove old xPaas template files
+ file:
+ path: "{{ item }}"
+ state: absent
+ with_items:
+ - "{{ xpaas_templates_base }}/sso70-basic.json"
+
+- name: Remove old xPaas templates from openshift namespace
+ command: "{{ openshift.common.client_binary }} -n openshift delete templates/{{ item }}"
+ with_items:
+ - sso70-basic
+ register: oex_delete_old_xpaas_templates
+ failed_when: "'not found' not in oex_delete_old_xpaas_templates.stderr and oex_delete_old_xpaas_templates.rc != 0"
+ changed_when: false
+
- name: Import xPaas image streams
command: >
{{ openshift.common.client_binary }} {{ openshift_examples_import_command }} -n openshift -f {{ xpaas_image_streams }}