Transform both values of a task name into a byte str prior to comparing

Fixes #9571
This commit is contained in:
Toshio Kuratomi 2014-11-19 11:50:02 -08:00
parent a897a5ea89
commit c4c3cc315d
4 changed files with 32 additions and 3 deletions

View file

@ -603,11 +603,13 @@ class PlaybookCallbacks(object):
call_callback_module('playbook_on_no_hosts_remaining')
def on_task_start(self, name, is_conditional):
name = utils.to_bytes(name)
msg = "TASK: [%s]" % name
if is_conditional:
msg = "NOTIFIED: [%s]" % name
if hasattr(self, 'start_at'):
self.start_at = utils.to_bytes(self.start_at)
if name == self.start_at or fnmatch.fnmatch(name, self.start_at):
# we found out match, we can get rid of this now
del self.start_at