Closed montaropdf closed 5 years ago
Thanks for submitting this issue. I am considering different ways that this could work. I could create a dictionary in the python environment with the results of all the hosts keyed by host name. Would that work for you?
Yes, definitively.
Another solution, thou, could be to treat "#python" as an ansible handler that can be notified. That could avoid having very huge amount of data in memory for, potentially, a long time. Do you think that could be possible?
Anyway implement what is the easiest for you.
The memory use is a good point. I'll think about this a bit more. Ansible already holds too much in memory. I'll try not to make that worse.
Describe the bug Tasks runs for all hosts of the group specified in directive hosts, but any python cells afterward only get the result of the execution on the last host to finish its execution for the task.
To Reproduce Steps to reproduce the behavior:
Expected behavior Provide a way for python code to be executed each time a task is executed for a host or ensure that variables in register directives are lists that will accumulate the results of each task execution.
Desktop (please complete the following information):
Server (please complete the following information):
Additional context Add any other context about the problem here.