run a task before running everytask

13 views
Skip to first unread message

Steve Kieu

unread,
May 25, 2016, 7:46:05 PM5/25/16
to Ansible Project
Hi Team,

I have a bit silly question, is there a way to run a task before every tasks?

Like a hook but not in python.

My purpose is that I would insert a wait_for the DNS to come up. Our DNS server is sometimes reloaded/restarted so when ansible get into a task at that exact bad time it will error right away with message: host not found. I want it to be a bit more resilient, saying if fail for dns wait a bit more and try again about 3 or 4 seconds before giving up.

Kind regards
Reply all
Reply to author
Forward
0 new messages