From 6b0e66f285ffa9ed633db4a4eed1974d90128b64 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Tue, 19 Jul 2016 15:36:48 -0400 Subject: Secure router only when openshift.hosted.router.certificate.contents exists. --- roles/openshift_hosted/tasks/router/router.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/openshift_hosted') diff --git a/roles/openshift_hosted/tasks/router/router.yml b/roles/openshift_hosted/tasks/router/router.yml index 95f0617dc..dfea8ca4b 100644 --- a/roles/openshift_hosted/tasks/router/router.yml +++ b/roles/openshift_hosted/tasks/router/router.yml @@ -32,7 +32,7 @@ content: "{{ openshift.hosted.router.certificate.contents }}" dest: "{{ openshift_master_config_dir }}/openshift-router.pem" mode: 0600 - when: openshift.hosted.router.certificate | default(none) is not none + when: "'certificate' in openshift.hosted.router and 'contents' in openshift.hosted.router.certificate" - name: Retrieve list of openshift nodes matching router selector command: > @@ -53,7 +53,7 @@ {% if replicas > 1 -%} --replicas={{ replicas }} {% endif -%} - {% if openshift.hosted.router.certificate | default(none) is not none -%} + {% if 'certificate' in openshift.hosted.router and 'contents' in openshift.hosted.router.certificate -%} --default-cert={{ openshift_master_config_dir }}/openshift-router.pem {% endif -%} --namespace={{ openshift.hosted.router.namespace | default('default') }} -- cgit v1.2.3