summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-01-05 15:38:54 -0500
committerGitHub <noreply@github.com>2017-01-05 15:38:54 -0500
commita706f310f78eeab976395c6dc7cf3427b345b32f (patch)
treec2eb1b42babae517b83fcd73339c4046debfaf89
parentd2c142d6a0df84165c917745508ed3e9541f5cbf (diff)
parent83648d22eb2d057ab99e0a97d325601f61cef011 (diff)
downloadopenshift-a706f310f78eeab976395c6dc7cf3427b345b32f.tar.gz
openshift-a706f310f78eeab976395c6dc7cf3427b345b32f.tar.bz2
openshift-a706f310f78eeab976395c6dc7cf3427b345b32f.tar.xz
openshift-a706f310f78eeab976395c6dc7cf3427b345b32f.zip
Merge pull request #3036 from soltysh/docker_registry_volume
Fix jsonpath expected output when checking registry volume secrets
-rw-r--r--roles/openshift_hosted/tasks/registry/secure.yml11
1 files changed, 5 insertions, 6 deletions
diff --git a/roles/openshift_hosted/tasks/registry/secure.yml b/roles/openshift_hosted/tasks/registry/secure.yml
index b6d007835..31cc63281 100644
--- a/roles/openshift_hosted/tasks/registry/secure.yml
+++ b/roles/openshift_hosted/tasks/registry/secure.yml
@@ -34,13 +34,12 @@
- name: Create registry certificates if they do not exist
command: >
{{ openshift.common.client_binary }} adm ca create-server-cert
- --signer-cert=/etc/origin/master/ca.crt
- --signer-key=/etc/origin/master/ca.key
- --signer-serial=/etc/origin/master/ca.serial.txt
+ --signer-cert={{ openshift_master_config_dir }}/ca.crt
+ --signer-key={{ openshift_master_config_dir }}/ca.key
+ --signer-serial={{ openshift_master_config_dir }}/ca.serial.txt
--hostnames="{{ docker_registry_service_ip.stdout }},docker-registry.default.svc.cluster.local,{{ docker_registry_route_hostname }}"
--cert={{ openshift_master_config_dir }}/registry.crt
--key={{ openshift_master_config_dir }}/registry.key
- when: False in (docker_registry_certificates_stat_result.results | default([]) | oo_collect(attribute='stat.exists') | list)
- name: Create the secret for the registry certificates
command: >
@@ -65,12 +64,12 @@
- name: Determine if registry-certificates secret volume attached
command: >
{{ openshift.common.client_binary }} get dc/docker-registry
- -o jsonpath='{.spec.template.spec.volumes[*].secret.secretName}'
+ -o jsonpath='{.spec.template.spec.volumes[?(@.secret)].secret.secretName}'
--config={{ openshift_hosted_kubeconfig }}
-n default
register: docker_registry_volumes
changed_when: false
- failed_when: "'secretName is not found' not in docker_registry_volumes.stdout and docker_registry_volumes.rc != 0"
+ failed_when: "docker_registry_volumes.stdout != '' and 'secretName is not found' not in docker_registry_volumes.stdout and docker_registry_volumes.rc != 0"
- name: Attach registry-certificates secret volume
command: >