From e582bd5ec51cbfaaa29926e40ebe5e53b2e0a6c9 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 12 Mar 2012 21:02:38 -0400 Subject: [PATCH] Add fire and forget example --- examples/playbook.yml | 4 ++++ lib/ansible/playbook.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/playbook.yml b/examples/playbook.yml index 9c73273fff9..3523f7b4c91 100644 --- a/examples/playbook.yml +++ b/examples/playbook.yml @@ -9,6 +9,10 @@ action: command /bin/sleep 15 async: 45 poll: 5 + - name: fire and forget + action: command /bin/sleep 15 + async: 45 + poll: 0 - include: base.yml favcolor=blue - name: write the foo config file using vars set above action: template src=foo.j2 dest=/etc/some_random_foo.conf diff --git a/lib/ansible/playbook.py b/lib/ansible/playbook.py index fd4a8c3c94f..d68d767be48 100755 --- a/lib/ansible/playbook.py +++ b/lib/ansible/playbook.py @@ -283,7 +283,7 @@ class PlayBook(object): name = task['name'] action = task['action'] async_seconds = int(task.get('async', 0)) # not async by default - async_poll_interval = int(task.get('poll', 30)) # default poll = 30 seconds + async_poll_interval = int(task.get('poll', 10)) # default poll = 10 seconds # comment = task.get('comment', '')