See my previous response, first sentence.
On Wed, May 21, 2014 at 6:48 PM, Mike Titus <[email protected]> wrote: > Actually, I was just hoping for an $ansible_something variable that I > could use in a module like sns / pagerduty / etc. > > Mike > > > On Wednesday, May 21, 2014 2:50:53 PM UTC-7, Michael DeHaan wrote: > >> Currently yes. I'm not opposed to the callback system being modified to >> keep these kind of counts, however, though I believe currently callback >> plugins do live in fork memory, thus it might not be possible. >> >> Would have to dive in deeper. >> >> Callback plugin is a possible answer. >> >> >> On Mon, May 19, 2014 at 3:16 PM, Matt Martz <[email protected]> wrote: >> >>> You would need to utilize a callback plugin. >>> >>> Your CallbackModule class could implement a counter attribute, and >>> runner_on_failed could increment and check the count. >>> >>> If it exceeds a threshold, fire off some form of message. >>> >>> You can see some examples at https://github.com/ansible/ >>> ansible/tree/devel/plugins/callbacks >>> >>> >>> On Monday, May 19, 2014, Mike Titus <[email protected]> wrote: >>> >>>> Is there any way, during the execution of a playbook, to access the >>>> current failure count? The final failure count is displayed in the PLAY >>>> RECAP section of the log output: >>>> >>>> xxx.xx.xx.xxx : ok=37 changed=1 unreachable=0 failed=3 >>>> >>>> Before the playbook completes, I want to check the failure count and >>>> send an alert if n > 1. >>>> >>>> Thanks, >>>> >>>> Mike >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ansible Project" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> To view this discussion on the web visit https://groups.google.com/d/ >>>> msgid/ansible-project/b13c2ee0-117c-4695-a887- >>>> fc4d2c9456eb%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/b13c2ee0-117c-4695-a887-fc4d2c9456eb%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> -- >>> Matt Martz >>> [email protected] >>> http://sivel.net/ >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Ansible Project" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> To view this discussion on the web visit https://groups.google.com/d/ >>> msgid/ansible-project/CAD8N0v80QkZkEyfrURaapeT7U14d% >>> 3Dbu%2Bpxkecvnj9UAYxpvcrA%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CAD8N0v80QkZkEyfrURaapeT7U14d%3Dbu%2Bpxkecvnj9UAYxpvcrA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/126444dd-aa6c-44ae-bd91-9e5cc27498ce%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/126444dd-aa6c-44ae-bd91-9e5cc27498ce%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgyfHtiN1vQoC5vVgyiegk2nB1%2B8H8uaZgw0zHdq8P3-0Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
