To clarify as the question indicates some misunderstanding, roles can only
fail on import, what is failing is a task (which happens to be in a role)‚Äč.

Tasks in post_tasks, are just like any other task, the only difference is
ordering,  they get executed after all previous tasks/role sections.

Any normal task won't execute for a host if that host is in a failed state.

There is only one way to execute tasks after a failed state is via locating
them inside the 'rescue' section of a block which contains the failing
task.

A different approach is negating the fail state to begin with, using
failed_when or ignore_errors.


----------
Brian Coca

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7cChinRz61nxhtov8mPJr910z87esY0RUvKSc0j8GnqXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to