Ansible task always run

694 views
Skip to first unread message

G Joe

unread,
Apr 8, 2016, 12:32:41 AM4/8/16
to Ansible Project
Hi..


I'm looking  for a way to always run a task at the end of script, even if  tasks before that were failed. Is there any option such  as always_run etc. 

Please advise.

Thanks.
GJ

Paul Tötterman

unread,
Apr 8, 2016, 7:40:06 AM4/8/16
to Ansible Project
I'm looking  for a way to always run a task at the end of script, even if  tasks before that were failed. Is there any option such  as always_run etc. 

Johannes Kastl

unread,
Apr 9, 2016, 1:52:10 PM4/9/16
to ansible...@googlegroups.com
On 08.04.16 06:32 G Joe wrote:

> I'm looking for a way to always run a task at the end of script, even if
> tasks before that were failed. Is there any option such as always_run
> etc.

I am not an expert, but IMHO this would mean setting "ignore_errors:
true" on all tasks before the one that should always run...

Johannes

signature.asc

G Joe

unread,
Apr 10, 2016, 10:03:15 PM4/10/16
to Ansible Project
as aforementioned - blocks: always feature  in 2.0 seems to suffice my requirement.


thanks.

G Joe

unread,
Apr 10, 2016, 10:03:51 PM4/10/16
to Ansible Project
thanks. that helped.
Reply all
Reply to author
Forward
0 new messages