From 4a50975c413b99ea88477013dbd194548ce751b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Francisco=20San=20Nicol=C3=A1s=20Mart=C3=ADne?= =?UTF-8?q?z?= Date: Tue, 23 Nov 2021 15:44:54 +0100 Subject: [PATCH] Testing with command Testing with become true Testing with become yes --- .gitignore | 1 + async_tasks.yml | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 152f908b86..34c31dc315 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.pyc +.idea /tower_collection_actual.yml \ No newline at end of file diff --git a/async_tasks.yml b/async_tasks.yml index 5e36d4f47d..2de0043fbc 100644 --- a/async_tasks.yml +++ b/async_tasks.yml @@ -1,6 +1,7 @@ --- -- hosts: all +- name: Run Async Tasks playbooks + hosts: all gather_facts: false tasks: @@ -13,7 +14,7 @@ - name: Poll a sleep command: "sleep 10" async: 30 - poll: 5 + poll: 0 - debug: msg: "I'm a debug message." @@ -28,7 +29,9 @@ msg: "I'm another debug message." - name: Examine slow command - async_status: jid={{ fired.ansible_job_id }} + async_status: + jid: "{{ fired.ansible_job_id }}" + mode: status register: slow_command until: slow_command.finished retries: 20 @@ -43,7 +46,9 @@ msg: "I'm yet another debug message." - name: Examine slow reversal - async_status: jid={{ fired.ansible_job_id }} + async_status: + jid: "{{ fired.ansible_job_id }}" + mode: status register: slow_command until: slow_command.finished retries: 20