Description of problem: Run a playbook with openshift_certificate_expiry role to check certs with json report generated, the report's summary part has only expired&warning numbers but not total numbers and 'ok' numbers. It is not convenient for user to catch the check result. <--snip--> "summary": { "expired": 0, "warning": 0 } <--snip--> So QE suggested to add them to help user quickly know how many certs have been checked just like what is be output in html report: Checked 14 total certificates. Expired/Warning/OK: 0/0/14. Warning window: 30 days Version-Release number of selected component (if applicable): openshift-ansible-roles-3.4.12-1.git.0.0b5efd2.el7.noarch How reproducible: always Steps to Reproduce: 1.Wrote a playbook to run role openshift_certificate_expiry. cat playbook.yml --- - name: Check cert expirys hosts: all become: yes gather_facts: no vars: openshift_certificate_expiry_show_all: yes openshift_certificate_expiry_generate_html_report: yes openshift_certificate_expiry_save_json_results: yes roles: - role: openshift_certificate_expiry 2.It will generate html and json report in default directory. Actual results: <--snip--> "summary": { "expired": 0, "warning": 0 } <--snip--> Expected results: Json report should include total/ok number like following: <--snip--> "summary": { "total": 14 "expired": 0, "warning": 0, "ok":14 } <--snip--> Additional info:
Was working on a patch for this on GitHub: https://github.com/openshift/openshift-ansible/pull/2829
Patch has been merged into master.
Version: atomic-openshift-utils-3.4.56-1.git.0.7ba9968.el7.noarch Steps: 1. Install ocp3.4 2. Wrote a playbook to run role openshift_certificate_expiry. 3. Check result is right and total/ok numbers are added into json report now <snip> }, "summary": { "expired": 0, "ok": 14, "total": 14, "warning": 0 } <snip> Bug has been fixed, change status.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:0448