diff --git a/roles/hostpath-provisioner/tasks/main.yml b/roles/hostpath-provisioner/tasks/main.yml index 45a3699..b4991e3 100644 --- a/roles/hostpath-provisioner/tasks/main.yml +++ b/roles/hostpath-provisioner/tasks/main.yml @@ -19,9 +19,12 @@ - name: Copy the PersistentVolumeClaim object definition copy: src=registry-storage-pvc.yaml dest=/tmp/registry-storage-pvc.yaml + when: hostpath_provisioner_options.patch_docker_registry - name: Create a PersistentVolumeClaim for the docker-registry command: oc create -n default -f /tmp/registry-storage-pvc.yaml + when: hostpath_provisioner_options.patch_docker_registry - name: Add the new volume to docker-registry command: oc volume dc docker-registry -n default --add=true --overwrite=true --type=persistentVolumeClaim --name=registry-storage --claim-name=registry-storage + when: hostpath_provisioner_options.patch_docker_registry diff --git a/roles/hostpath-provisioner/vars/main.yml b/roles/hostpath-provisioner/vars/main.yml index 44149b1..9001c2e 100644 --- a/roles/hostpath-provisioner/vars/main.yml +++ b/roles/hostpath-provisioner/vars/main.yml @@ -5,3 +5,4 @@ target_namespace: default docker_image: nmasse/openshift-hostpath-provisioner:latest template: https://raw.githubusercontent.com/nmasse-itix/OpenShift-HostPath-Provisioner/master/setup/hostpath-provisioner-template.yaml + patch_docker_registry: true