浏览代码

Add oc_get_nodes to debug csr output

This commit adds more debug information for easier user
troubleshooting of csr process.
Michael Gugino 6 年之前
父节点
当前提交
9831c44567
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      roles/lib_openshift/library/oc_csr_approve.py

+ 2 - 1
roles/lib_openshift/library/oc_csr_approve.py

@@ -85,6 +85,7 @@ class CSRapprove(object):
         # Build a dictionary to hold all of our output information so nothing
         # Build a dictionary to hold all of our output information so nothing
         # is lost when we fail.
         # is lost when we fail.
         self.result = {'changed': False, 'rc': 0,
         self.result = {'changed': False, 'rc': 0,
+                       'oc_get_nodes': None,
                        'client_csrs': None,
                        'client_csrs': None,
                        'server_csrs': None,
                        'server_csrs': None,
                        'all_subjects_found': self.all_subjects_found,
                        'all_subjects_found': self.all_subjects_found,
@@ -117,7 +118,7 @@ class CSRapprove(object):
             self.result['msg'] = str(err)
             self.result['msg'] = str(err)
             self.result['state'] = 'unknown'
             self.result['state'] = 'unknown'
             self.module.fail_json(**self.result)
             self.module.fail_json(**self.result)
-
+        self.result['oc_get_nodes'] = data
         ready_nodes = []
         ready_nodes = []
         for node in data['items']:
         for node in data['items']:
             if node.get('status') and node['status'].get('conditions'):
             if node.get('status') and node['status'].get('conditions'):