diff options
author | Scott Dodson <sdodson@redhat.com> | 2015-06-19 10:00:41 -0400 |
---|---|---|
committer | Scott Dodson <sdodson@redhat.com> | 2015-06-22 15:37:50 -0400 |
commit | 15bcfb3e59e6e31c00e23725547f896c03c93290 (patch) | |
tree | fbb1a0138703a7183e49cf07c6bd1ea0e863e241 /roles/openshift_examples/tasks | |
parent | a7ac3f7b513fe57ddccad15bdb6c7e9091f16bcd (diff) | |
download | openshift-15bcfb3e59e6e31c00e23725547f896c03c93290.tar.gz openshift-15bcfb3e59e6e31c00e23725547f896c03c93290.tar.bz2 openshift-15bcfb3e59e6e31c00e23725547f896c03c93290.tar.xz openshift-15bcfb3e59e6e31c00e23725547f896c03c93290.zip |
Add openshift_examples role
This role installs db-templates, image-streams, and quickstart-templates into
/usr/share/openshift/examples on the master and then uses `oc create` to import
them.
Diffstat (limited to 'roles/openshift_examples/tasks')
-rw-r--r-- | roles/openshift_examples/tasks/main.yml | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/roles/openshift_examples/tasks/main.yml b/roles/openshift_examples/tasks/main.yml new file mode 100644 index 000000000..da8f603d7 --- /dev/null +++ b/roles/openshift_examples/tasks/main.yml @@ -0,0 +1,53 @@ +--- +- name: Copy openshift examples + synchronize: src=examples dest=/usr/share/openshift + +# RHEL and Centos image streams are mutually exclusive +- name: Import RHEL streams + command: > + {{ openshift.common.client_binary }} create -n openshift -f {{ rhel_image_streams }} + when: openshift_examples_load_rhel + 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 + +- name: Import Centos Image streams + command: > + {{ openshift.common.client_binary }} create -n openshift -f {{ centos_image_streams }} + when: openshift_examples_load_centos | bool + register: oex_import_centos_streams + failed_when: "'already exists' not in oex_import_centos_streams.stderr and oex_import_centos_streams.rc != 0" + changed_when: false + +- name: Import db templates + command: > + {{ openshift.common.client_binary }} create -n openshift -f {{ db_templates_base }} + when: openshift_examples_load_db_templates | bool + register: oex_import_db_templates + failed_when: "'already exists' not in oex_import_db_templates.stderr and oex_import_db_templates.rc != 0" + changed_when: false + +- name: Import quickstart-templates + command: > + {{ openshift.common.client_binary }} create -n openshift -f {{ quickstarts_base }} + when: openshift_examples_load_quickstarts + register: oex_import_quickstarts + failed_when: "'already exists' not in oex_import_quickstarts.stderr and oex_import_quickstarts.rc != 0" + changed_when: false + + +- name: Import xPaas image streams + command: > + {{ openshift.common.client_binary }} create -n openshift -f {{ xpaas_image_streams }} + when: openshift_examples_load_xpaas | bool + register: oex_import_xpaas_streams + failed_when: "'already exists' not in oex_import_xpaas_streams.stderr and oex_import_xpaas_streams.rc != 0" + changed_when: false + +- name: Import xPaas templates + command: > + {{ openshift.common.client_binary }} create -n openshift -f {{ xpaas_templates_base }} + when: openshift_examples_load_xpaas | bool + register: oex_import_xpaas_templates + failed_when: "'already exists' not in oex_import_xpaas_templates.stderr and oex_import_xpaas_templates.rc != 0" + changed_when: false |