Skip to content

Commit

Permalink
Set play context on stdout callback plugin (ansible#35910)
Browse files Browse the repository at this point in the history
The loop on self._callback_plugins does not include the stdout callback,
so the stdout_callback never has set_play_context called.
  • Loading branch information
emonty authored and kbreit committed Jan 11, 2019
1 parent 257afb7 commit 31a62df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ansible/executor/task_queue_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ def run(self, play):
)

play_context = PlayContext(new_play, self._options, self.passwords, self._connection_lockfile.fileno())
if (self._stdout_callback and
hasattr(self._stdout_callback, 'set_play_context')):
self._stdout_callback.set_play_context(play_context)

for callback_plugin in self._callback_plugins:
if hasattr(callback_plugin, 'set_play_context'):
callback_plugin.set_play_context(play_context)
Expand Down

0 comments on commit 31a62df

Please sign in to comment.