瀏覽代碼

Fix registry volume

Scott Dodson 8 年之前
父節點
當前提交
7c36172fb0
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml

+ 2 - 1
roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml

@@ -5,10 +5,11 @@
 - name: Determine if volume is already attached to dc/docker-registry
   command: "{{ openshift.common.client_binary }} get -o template dc/docker-registry --template=\\{\\{.spec.template.spec.volumes\\}\\} --output-version=v1"
   changed_when: false
+  failed_when: false
   register: registry_volumes_output
 
 - set_fact:
-    volume_attached: "{{ registry_volume_claim in registry_volumes_output.stdout }}"
+    volume_attached: "{{ registry_volume_claim in (registry_volumes_output).stdout | default(['']) }}"
 
 - name: Add volume to dc/docker-registry
   command: >