I have playbook played in tower and at the end of a block I use meta: end_play module without any condition.
I don’t know why but this task is ignored and when I enable debug it displays:
META:
Instead of:
META: END PLAY
What can be the reason for tower or ansible to ignore meta?
TASK [Validate discovered switch interfaces from switch-side MAC addresses] ****
ok: [SWITCH56 → localhost]
As you can see, the task Check difference between the configuration of interfaces and targets configurations is successfull so just after that the meta end play must stop the execution but the playbook continues and the next task Validate discovered switch interfaces from switch-side MAC addresses is played.
You don't have any conditionals defined on the tasks, but from the
output you show they are inheriting some conditional (otherwise they
would not skip hosts) so the meta task is probably skipped because the
first host that triggers it has that conditional result in False (see
run_once/bypass host loop behaviors).
Thanks a lot!
Indeed,as the first host that triggered it does not have the required conditions the task is skipped for all others hosts.
It seems that it does not work like others modules that check the condition for all hosts to execute or not the task for each of them.