--- - hosts: localhost tasks: - name: Simulate long running op, allow to run for 45 sec, fire and forget ansible.builtin.shell: | (sleep 5; echo test1; sleep 5; echo test2; sleep 5;) > /tmp/sleeper.txt async: 45 poll: 0 register: sleeper - name: Follow script output print_download_status: status_file: "/tmp/sleeper.txt" async_job: "{{ sleeper }}"