From 2c74ce7fcb6ea922cc1c8de95ea79fc86e9be70c Mon Sep 17 00:00:00 2001 From: lework Date: Sat, 12 Oct 2019 18:34:32 +0800 Subject: [PATCH] fix --- python/facts_os_check/ansible.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/facts_os_check/ansible.py b/python/facts_os_check/ansible.py index 81beea9..b880686 100644 --- a/python/facts_os_check/ansible.py +++ b/python/facts_os_check/ansible.py @@ -313,7 +313,7 @@ class Ansible(object): self.check_result['summary']['ok'] = len(self.check_result['ok']) self.check_result['summary']['bad'] = len(self.check_result['bad']) self.check_result['summary']['critical'] = len(self.check_result['critical']) - self.check_result['summary']['total'] = len(self.host_data.values()) + self.check_result['summary']['error'] + self.check_result['summary']['total'] = len(self.host_data.values()) self.check_result['time'] = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') @@ -379,5 +379,5 @@ if __name__ == '__main__': 'mail_user': 'ops@lework.com', 'mail_pass': '123123' } - print(json.dumps(check_result)) + send_mail(mail_config, to_list, subject, html)