Don't try to generate retry files if the tqm hasn't been initialized

Fixes #14144
This commit is contained in:
James Cammarata 2016-01-27 09:56:19 -05:00
parent 7e3963420d
commit a61e51efb7

View file

@ -172,6 +172,8 @@ class PlaybookExecutor:
if entry: if entry:
entrylist.append(entry) # per playbook entrylist.append(entry) # per playbook
# send the stats callback for this playbook
if self._tqm is not None:
if C.RETRY_FILES_ENABLED: if C.RETRY_FILES_ENABLED:
retries = list(set(self._tqm._failed_hosts.keys() + self._tqm._unreachable_hosts.keys())) retries = list(set(self._tqm._failed_hosts.keys() + self._tqm._unreachable_hosts.keys()))
retries.sort() retries.sort()
@ -186,8 +188,6 @@ class PlaybookExecutor:
if self._generate_retry_inventory(filename, retries): if self._generate_retry_inventory(filename, retries):
display.display("\tto retry, use: --limit @%s\n" % filename) display.display("\tto retry, use: --limit @%s\n" % filename)
# send the stats callback for this playbook
if self._tqm is not None:
self._tqm.send_callback('v2_playbook_on_stats', self._tqm._stats) self._tqm.send_callback('v2_playbook_on_stats', self._tqm._stats)
# if the last result wasn't zero, break out of the playbook file name loop # if the last result wasn't zero, break out of the playbook file name loop