Skip to content

Commit 4f6eba6

Browse files
committed
Testing with command
Testing with become true Testing with become yes
1 parent a073e1a commit 4f6eba6

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.pyc
2+
.idea
23

34
/tower_collection_actual.yml

async_tasks.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22

3-
- hosts: all
3+
- name: Run Async Tasks playbooks
4+
hosts: all
45
gather_facts: false
6+
become: yes
57
tasks:
68

79
- name: Create the async directory to prevent race conditions
@@ -13,7 +15,7 @@
1315
- name: Poll a sleep
1416
command: "sleep 10"
1517
async: 30
16-
poll: 5
18+
poll: 0
1719

1820
- debug:
1921
msg: "I'm a debug message."
@@ -28,7 +30,9 @@
2830
msg: "I'm another debug message."
2931

3032
- name: Examine slow command
31-
async_status: jid={{ fired.ansible_job_id }}
33+
async_status:
34+
jid: "{{ fired.ansible_job_id }}"
35+
mode: status
3236
register: slow_command
3337
until: slow_command.finished
3438
retries: 20
@@ -43,7 +47,9 @@
4347
msg: "I'm yet another debug message."
4448

4549
- name: Examine slow reversal
46-
async_status: jid={{ fired.ansible_job_id }}
50+
async_status:
51+
jid: "{{ fired.ansible_job_id }}"
52+
mode: status
4753
register: slow_command
4854
until: slow_command.finished
4955
retries: 20

0 commit comments

Comments
 (0)