Let’s assume I have a hostgroup of 6 hosts and I need to run a playbook (play1) two times in sequence for different hosts in that group because of depenencies between some hosts.
I’d like to gather information within both plays and pass that information further.
In a last step I’d like to reuse the previously collected information in order to create a summary over all hosts (in both plays 1_a and 1_b); here for debugging (later I’d
like to use that information to create an html report with a Jinja2 templating).
The problem I have is the information in the debug messages are not per host. It seems it stores just the output from one host and reuses it for all others in the
inventory in the last play (see sample output of the report_comment variable below → just one of those 6 servers had that exception).
I’m not sure if using the set_stats module is the best way to reach what I’d like?
Or would it be better to store the information in temp. files on localhost and read the information in the last play?
Any ideas or suggestions how to reach my goal would be much appreciated!
Workflow Template
-------------| |-------------| |-------------|
play1_a | —> | play1_b | —> | summary |
-------------| |-------------| |-------------|
play1_a: