StrategyPlugin: Project manager ▸ PlayIterator: The overseer ▸ {Worker,Result}Process: The work force ▸ Task{Executor,Result}: the chainsaw used by the work force
code before and after a task. class StrategyModule(Linear): def run(self, iterator, play_context): for block in iterator._blocks: for task in block.block: if task.get_name() == "your module name": hosts = self._inventory.get_hosts(iterator._play_.hosts) run_your_code_here(task, hosts, play_context) return Linear.run(self, iterator, play_context)