email play recap output

402 views
Skip to first unread message

Gisbert Haas

unread,
Feb 26, 2021, 7:51:10 AM2/26/21
to Ansible Project
Hi All, anyone got a pride idea how to email the play recap output only?

Thanks a million
Gisbert

Vladimir Botka

unread,
Feb 26, 2021, 8:19:59 AM2/26/21
to Gisbert Haas, ansible...@googlegroups.com
On Fri, 26 Feb 2021 04:51:10 -0800 (PST)
Gisbert Haas <gisbe...@gmail.com> wrote:

> .. idea how to email the play recap output only?

Use ansible-runner. The recap will be available among the artifacts
https://ansible-runner.readthedocs.io/en/stable/intro.html#runner-artifacts-directory-hierarchy

FWIW, see example of how to get custom status including the recap
https://ansible-runner-role.readthedocs.io/en/latest/example3-status.html

It should be easy to modify the wrapper to your needs
https://github.com/vbotka/ansible-runner/blob/master/contrib/arwrapper.bash


--
Vladimir Botka

Brian Coca

unread,
Mar 1, 2021, 2:11:53 PM3/1/21
to Ansible Project, Gisbert Haas
A custom callback can do it, see the existing email one as example
https://docs.ansible.com/ansible/latest/collections/community/general/mail_callback.html

--
----------
Brian Coca

Reply all
Reply to author
Forward
0 new messages