How do you use the set_stats module?

I’m looking for interesting/cute/exciting/novel ways of using Ansible’s set_stats module.

Other than you can use it to count something or other and display it at playbook end, there’s not much that occurs to me.

What are you using it for?

1 Like

The main reason for introducing it was for tower/awx so that variables could be added in a location that could be used in a workflow for subsequent ansible-playbook executions. The output from the first execution, is injected into the 2nd using --extra-vars.

I have an example of how this works outside of awx:

3 Likes

Very interesting, thank you, Matt.