I'd like to make Ansible run a task per some object found at runtime. For example one per file in a specified directory or one per running process. Is there a way to implement this inside of task/playbook? I'd like the result to be integrated into the normal output as a task in its own rights, ideally with adjusted task and "register" variable name.
Unfortunately all the examples I can find are static definitions.