123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- ---
- - name: reboot a machine
-
- hosts: localhost
- gather_facts: no
- tasks:
- - name: reboot
- command: sleep 30
- changed_when: false
- async: 125
- poll: 0
- register: long_runner
- - name: do some jiggawagoo
- command: sleep 3
- - debug: var=long_runner
- - name: check if the long-running task completed yet
- async_status:
- jid: "{{ long_runner.ansible_job_id }}"
- register: long_check
- until: long_check.finished
- delay: 5
- retries: 20
|