mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 22:11:44 -07:00
Fix a couple start-at-task issues
* added pattern matching to match v1 functionality * check the task name, not the task+role name for matches * make sure the input is unicode Fixes #11692
This commit is contained in:
parent
975172c1ef
commit
135404738e
2 changed files with 7 additions and 4 deletions
|
@ -19,6 +19,8 @@
|
|||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import fnmatch
|
||||
|
||||
from ansible import constants as C
|
||||
|
||||
from ansible.errors import *
|
||||
|
@ -108,10 +110,10 @@ class PlayIterator:
|
|||
(s, task) = self.get_next_task_for_host(host, peek=True)
|
||||
if s.run_state == self.ITERATING_COMPLETE:
|
||||
break
|
||||
if task.get_name() != play_context.start_at_task:
|
||||
self.get_next_task_for_host(host)
|
||||
else:
|
||||
if task.name == play_context.start_at_task or fnmatch.fnmatch(task.name, play_context.start_at_task):
|
||||
break
|
||||
else:
|
||||
self.get_next_task_for_host(host)
|
||||
|
||||
# Extend the play handlers list to include the handlers defined in roles
|
||||
self._play.handlers.extend(play.compile_roles_handlers())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue