summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/lib_openshift/library/oc_adm_ca_server_cert.py3
-rw-r--r--roles/lib_openshift/src/class/oc_adm_ca_server_cert.py3
-rw-r--r--roles/openshift_hosted/tasks/registry/secure.yml2
3 files changed, 7 insertions, 1 deletions
diff --git a/roles/lib_openshift/library/oc_adm_ca_server_cert.py b/roles/lib_openshift/library/oc_adm_ca_server_cert.py
index 9390ea7c1..74ef57b4e 100644
--- a/roles/lib_openshift/library/oc_adm_ca_server_cert.py
+++ b/roles/lib_openshift/library/oc_adm_ca_server_cert.py
@@ -1492,6 +1492,9 @@ class CAServerCert(OpenShiftCLI):
api_rval = server_cert.create()
+ if api_rval['returncode'] != 0:
+ return {'Failed': True, 'msg': api_rval}
+
return {'changed': True, 'results': api_rval, 'state': state}
########
diff --git a/roles/lib_openshift/src/class/oc_adm_ca_server_cert.py b/roles/lib_openshift/src/class/oc_adm_ca_server_cert.py
index 6ed1f2f35..18c69f2fa 100644
--- a/roles/lib_openshift/src/class/oc_adm_ca_server_cert.py
+++ b/roles/lib_openshift/src/class/oc_adm_ca_server_cert.py
@@ -122,6 +122,9 @@ class CAServerCert(OpenShiftCLI):
api_rval = server_cert.create()
+ if api_rval['returncode'] != 0:
+ return {'Failed': True, 'msg': api_rval}
+
return {'changed': True, 'results': api_rval, 'state': state}
########
diff --git a/roles/openshift_hosted/tasks/registry/secure.yml b/roles/openshift_hosted/tasks/registry/secure.yml
index bd513b943..f9ea2ebeb 100644
--- a/roles/openshift_hosted/tasks/registry/secure.yml
+++ b/roles/openshift_hosted/tasks/registry/secure.yml
@@ -8,7 +8,7 @@
backup: True
dest: "/etc/origin/master/named_certificates/{{ item.value | basename }}"
src: "{{ item.value }}"
- when: item.key in ['certfile', 'keyfile', 'cafile'] and item.value is not None
+ when: item.key in ['certfile', 'keyfile', 'cafile'] and item.value
with_dict: "{{ openshift_hosted_registry_routecertificates }}"
# When certificates are defined we will create the reencrypt