* Remove incorrect code
(cherry picked from commit 88bfc7977d
)
This commit is contained in:
parent
4dece71417
commit
4cfe2cf8dc
2 changed files with 4 additions and 2 deletions
2
changelogs/fragments/fix_meta_tasks_with_flush_cache.yml
Normal file
2
changelogs/fragments/fix_meta_tasks_with_flush_cache.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- Fix execution of the meta tasks 'clear_facts', 'clear_host_errors', 'end_play', 'end_host', and 'reset_connection' when the CLI flag '--flush-cache' is provided.
|
|
@ -198,7 +198,6 @@ class StrategyBase:
|
|||
self._final_q = tqm._final_q
|
||||
self._step = context.CLIARGS.get('step', False)
|
||||
self._diff = context.CLIARGS.get('diff', False)
|
||||
self.flush_cache = context.CLIARGS.get('flush_cache', False)
|
||||
|
||||
# the task cache is a dictionary of tuples of (host.name, task._uuid)
|
||||
# used to find the original task object of in-flight tasks and to store
|
||||
|
@ -1138,6 +1137,7 @@ class StrategyBase:
|
|||
|
||||
skipped = False
|
||||
msg = ''
|
||||
# The top-level conditions should only compare meta_action
|
||||
if meta_action == 'noop':
|
||||
# FIXME: issue a callback for the noop here?
|
||||
if task.when:
|
||||
|
@ -1150,7 +1150,7 @@ class StrategyBase:
|
|||
self.run_handlers(iterator, play_context)
|
||||
self._flushed_hosts[target_host] = False
|
||||
msg = "ran handlers"
|
||||
elif meta_action == 'refresh_inventory' or self.flush_cache:
|
||||
elif meta_action == 'refresh_inventory':
|
||||
if task.when:
|
||||
self._cond_not_supported_warn(meta_action)
|
||||
self._inventory.refresh_inventory()
|
||||
|
|
Loading…
Reference in a new issue