Closed dkerwin closed 9 years ago
Good stuff, thanks!
Apart from my comment, I think we could avoid duplicating code by factorizing these two blocks: https://github.com/gini/ansible-datadog-callback/blob/fix_no_log_and_invocation_key/datadog_callback.py#L116-L126 and https://github.com/gini/ansible-datadog-callback/blob/fix_no_log_and_invocation_key/datadog_callback.py#L139-L148 into one function (that could take a boolean argument to choose between including and not including the msg
in the event_text
when all the fields are there).
What do you think?
Commit 47c1c58 refactors the event_text generation
Awesome, thanks a lot for your contribution @dkerwin!
Merging this.
Task example for no_log: True. Leads to missing invocation key as well.
Value of result:
Cheers :beers:
Daniel