summaryrefslogtreecommitdiffstats
path: root/playbooks/openshift-glusterfs/private/registry.yml
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-11-22 13:08:21 -0500
committerGitHub <noreply@github.com>2017-11-22 13:08:21 -0500
commit5889d10321ced514a1a235016bc4173895065474 (patch)
treee6af79a06a65a26a144e3a5cdb750494999a4172 /playbooks/openshift-glusterfs/private/registry.yml
parent6cde29151f922127c7ea45a8949a015998739945 (diff)
parentb972abfa8c47e821c55e519a8a1d08b771946e49 (diff)
downloadopenshift-5889d10321ced514a1a235016bc4173895065474.tar.gz
openshift-5889d10321ced514a1a235016bc4173895065474.tar.bz2
openshift-5889d10321ced514a1a235016bc4173895065474.tar.xz
openshift-5889d10321ced514a1a235016bc4173895065474.zip
Merge pull request #6157 from mtnbikenc/consolidate-openshift-glusterfs
Playbook Consolidation - openshift-glusterfs
Diffstat (limited to 'playbooks/openshift-glusterfs/private/registry.yml')
-rw-r--r--playbooks/openshift-glusterfs/private/registry.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/playbooks/openshift-glusterfs/private/registry.yml b/playbooks/openshift-glusterfs/private/registry.yml
new file mode 100644
index 000000000..80cf7529e
--- /dev/null
+++ b/playbooks/openshift-glusterfs/private/registry.yml
@@ -0,0 +1,49 @@
+---
+- include: config.yml
+
+- name: Initialize GlusterFS registry PV and PVC vars
+ hosts: oo_first_master
+ tags: hosted
+ tasks:
+ - set_fact:
+ glusterfs_pv: []
+ glusterfs_pvc: []
+
+ - set_fact:
+ glusterfs_pv:
+ - name: "{{ openshift.hosted.registry.storage.volume.name }}-glusterfs-volume"
+ capacity: "{{ openshift.hosted.registry.storage.volume.size }}"
+ access_modes: "{{ openshift.hosted.registry.storage.access.modes }}"
+ storage:
+ glusterfs:
+ endpoints: "{{ openshift.hosted.registry.storage.glusterfs.endpoints }}"
+ path: "{{ openshift.hosted.registry.storage.glusterfs.path }}"
+ readOnly: "{{ openshift.hosted.registry.storage.glusterfs.readOnly }}"
+ glusterfs_pvc:
+ - name: "{{ openshift.hosted.registry.storage.volume.name }}-glusterfs-claim"
+ capacity: "{{ openshift.hosted.registry.storage.volume.size }}"
+ access_modes: "{{ openshift.hosted.registry.storage.access.modes }}"
+ when: openshift.hosted.registry.storage.glusterfs.swap
+
+- name: Create persistent volumes
+ hosts: oo_first_master
+ tags:
+ - hosted
+ vars:
+ persistent_volumes: "{{ hostvars[groups.oo_first_master.0] | oo_persistent_volumes(groups, glusterfs_pv) }}"
+ persistent_volume_claims: "{{ hostvars[groups.oo_first_master.0] | oo_persistent_volume_claims(glusterfs_pvc) }}"
+ roles:
+ - role: openshift_persistent_volumes
+ when: persistent_volumes | union(glusterfs_pv) | length > 0 or persistent_volume_claims | union(glusterfs_pvc) | length > 0
+
+- name: Create Hosted Resources
+ hosts: oo_first_master
+ tags:
+ - hosted
+ pre_tasks:
+ - set_fact:
+ openshift_hosted_router_registryurl: "{{ hostvars[groups.oo_first_master.0].openshift.master.registry_url }}"
+ openshift_hosted_registry_registryurl: "{{ hostvars[groups.oo_first_master.0].openshift.master.registry_url }}"
+ when: "'master' in hostvars[groups.oo_first_master.0].openshift and 'registry_url' in hostvars[groups.oo_first_master.0].openshift.master"
+ roles:
+ - role: openshift_hosted