From 3d484dd5e5ac4a8ba0c4b50baba79d6d7e5bba7e Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Tue, 21 Mar 2017 15:53:01 -0400 Subject: Adding error checking to the delete. --- roles/lib_openshift/src/class/oc_configmap.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roles/lib_openshift/src') diff --git a/roles/lib_openshift/src/class/oc_configmap.py b/roles/lib_openshift/src/class/oc_configmap.py index c034ead36..87de3e1df 100644 --- a/roles/lib_openshift/src/class/oc_configmap.py +++ b/roles/lib_openshift/src/class/oc_configmap.py @@ -138,6 +138,10 @@ class OCConfigMap(OpenShiftCLI): return {'changed': True, 'msg': 'CHECK_MODE: Would have performed a delete.'} api_rval = oc_cm.delete() + + if api_rval['returncode'] != 0: + return {'failed': True, 'msg': api_rval} + return {'changed': True, 'results': api_rval, 'state': state} ######## -- cgit v1.2.3