--- - name: Long running job test hosts: all gather_facts: no become: no vars: time_to_sleep : 300 run_cmd : "find /" poll_interval : 3 tasks: - name: Simulate a long running job command : "{{ run_cmd }}" async : "{{ time_to_sleep + 10 }}" # give +10s leeway poll : "{{ poll_interval }}" ...