diff options
author | Andrew Gaffney <andrew@agaffney.org> | 2018-08-10 13:00:31 -0500 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2018-08-10 23:39:44 -0700 |
commit | c1f41ee6070c2c416bfa44f743306a0e4749099c (patch) | |
tree | d99f11e6e0e6eb679eab5ddcb359ca0e59c16062 /lib | |
parent | 0392dbeba19d742741f95903de6e048f65510a50 (diff) | |
download | ansible-c1f41ee6070c2c416bfa44f743306a0e4749099c.tar.gz |
Display correct task title with strategy 'free' (fixes #43950)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/plugins/callback/default.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ansible/plugins/callback/default.py b/lib/ansible/plugins/callback/default.py index 08e0e560fd..71d892da9a 100644 --- a/lib/ansible/plugins/callback/default.py +++ b/lib/ansible/plugins/callback/default.py @@ -167,7 +167,11 @@ class CallbackModule(CallbackBase): def v2_playbook_on_task_start(self, task, is_conditional): # Preserve task name, as all vars may not be available for templating # when we need it later - if self._play.strategy != 'free': + if self._play.strategy == 'free': + # Explicitly set to None for strategy 'free' to account for any cached + # task title from a previous non-free play + self._last_task_name = None + else: self._last_task_name = task.get_name().strip() # Display the task banner immediately if we're not doing any filtering based on task result |