Ending summary of a playbook

28 views
Skip to first unread message

Chris Bidwell - NOAA Federal

unread,
Oct 12, 2018, 11:03:13 AM10/12/18
to ansible...@googlegroups.com
Hey all,

Is there any way to write out where I would get a summary of a playbook, other than what is already given with the passes, fails, changed, etc.  Let's say I write a playbook listing all servers/workstations that need to be rebooted after a kernel patch.  

Is there a way to do this?  I've got a playbook already in place that where it says:

    - debug:
        msg: "{{ inventory_hostname}} {{ reboot_required.stdout }}"
      when: reboot_required.stdout == "reboot"
      tags: reboot

That goes as the playbook runs.  I'd like to get a listing of all that match this at the end.  Any ideas?

Thanks!

Chris

Brian Coca

unread,
Oct 12, 2018, 11:10:49 AM10/12/18
to Ansible Project
you might be able to do this via set_stats
https://docs.ansible.com/ansible/latest/modules/set_stats_module.html?
and the 'show custom stats' setting
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#show-custom-stats



--
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages