summaryrefslogtreecommitdiffstats
path: root/roles/openshift_hosted
diff options
context:
space:
mode:
authorJustin Cook <jhcook@gmail.com>2016-10-11 10:08:29 +0100
committerJustin Cook <jhcook@gmail.com>2016-10-11 10:08:29 +0100
commit5bf011aee30cd566d1a1364e863287e05a639299 (patch)
treeebc5680f24e37a49c97fbf96bfc5ee0405eb99df /roles/openshift_hosted
parent69c6b0f3fc9d1908c35a661afcb2689fbf28207e (diff)
parent131bcdcd7ee5c3191c748beb7aad8d45c4477b98 (diff)
downloadopenshift-5bf011aee30cd566d1a1364e863287e05a639299.tar.gz
openshift-5bf011aee30cd566d1a1364e863287e05a639299.tar.bz2
openshift-5bf011aee30cd566d1a1364e863287e05a639299.tar.xz
openshift-5bf011aee30cd566d1a1364e863287e05a639299.zip
Merge branch 'master' of github.com:openshift/openshift-ansible into variable_with_no_default_2576
Diffstat (limited to 'roles/openshift_hosted')
-rw-r--r--roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml11
1 files changed, 9 insertions, 2 deletions
diff --git a/roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml b/roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml
index 60eefd71a..0172f5ca0 100644
--- a/roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml
+++ b/roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml
@@ -3,7 +3,11 @@
registry_volume_claim: "{{ openshift.hosted.registry.storage.volume.name }}-claim"
- 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"
+ command: >
+ {{ openshift.common.client_binary }}
+ --config={{ openshift_hosted_kubeconfig }}
+ --namespace={{ openshift.hosted.registry.namespace | default('default') }}
+ get -o template dc/docker-registry --template=\\{\\{.spec.template.spec.volumes\\}\\} --output-version=v1
changed_when: false
failed_when: false
register: registry_volumes_output
@@ -13,7 +17,10 @@
- name: Add volume to dc/docker-registry
command: >
- {{ openshift.common.client_binary }} volume dc/docker-registry
+ {{ openshift.common.client_binary }}
+ --config={{ openshift_hosted_kubeconfig }}
+ --namespace={{ openshift.hosted.registry.namespace | default('default') }}
+ volume dc/docker-registry
--add --overwrite -t persistentVolumeClaim --claim-name={{ registry_volume_claim }}
--name=registry-storage
when: not volume_attached | bool