This adds async poll support to playbooks. See examples. Some more testing due + docs

but this is more or less a mirror of what /bin/ansible does.  It also has a 'fire and
forget' mode if the poll interval is left off or set to 0.
This commit is contained in:
Michael DeHaan 2012-03-12 20:53:10 -04:00
commit 86e19cd8c8
5 changed files with 119 additions and 8 deletions

View file

@ -53,6 +53,12 @@ class PlaybookCallbacks(object):
def on_play_start(self, pattern):
print "PLAY [%s] ****************************\n" % pattern
def on_async_confused(self, msg):
print msg
def on_async_poll(self, jid, host, clock, host_result):
print async_poll_status(jid, host, clock, host_result)
def main(args):
''' run ansible-playbook operations '''