summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@afrolegs.com>2017-03-02 09:58:49 -0500
committerGitHub <noreply@github.com>2017-03-02 09:58:49 -0500
commit68aa6f269a6b0c4bf9af5f30d0dfb5ac6428b575 (patch)
tree31deced1507e0328411a85627bd398cdefcef41a /roles/lib_openshift
parent170819880c4c9a6d699f4c63537426fa50d487f0 (diff)
parent8621904168b5e99cbf03158d888e6883e627e1e9 (diff)
downloadopenshift-68aa6f269a6b0c4bf9af5f30d0dfb5ac6428b575.tar.gz
openshift-68aa6f269a6b0c4bf9af5f30d0dfb5ac6428b575.tar.bz2
openshift-68aa6f269a6b0c4bf9af5f30d0dfb5ac6428b575.tar.xz
openshift-68aa6f269a6b0c4bf9af5f30d0dfb5ac6428b575.zip
Merge pull request #3533 from kwoodson/registry_updates
Fixed error handling when oc adm ca create-server-cert fails. Fixed a logic error in secure.
Diffstat (limited to 'roles/lib_openshift')
-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
2 files changed, 6 insertions, 0 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}
########