mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-19 23:00:22 -07:00
Fixing multiple v2 bugs
This commit is contained in:
parent
4bc79a746a
commit
e82ba723e2
8 changed files with 115 additions and 95 deletions
|
@ -88,18 +88,11 @@ class PlayIterator:
|
|||
FAILED_ALWAYS = 8
|
||||
|
||||
def __init__(self, inventory, play):
|
||||
# FIXME: should we save the post_validated play from below here instead?
|
||||
self._play = play
|
||||
|
||||
# post validate the play, as we need some fields to be finalized now
|
||||
# so that we can use them to setup the iterator properly
|
||||
all_vars = inventory._variable_manager.get_vars(loader=inventory._loader, play=play)
|
||||
new_play = play.copy()
|
||||
new_play.post_validate(all_vars, fail_on_undefined=False)
|
||||
|
||||
self._blocks = new_play.compile()
|
||||
self._blocks = self._play.compile()
|
||||
self._host_states = {}
|
||||
for host in inventory.get_hosts(new_play.hosts):
|
||||
for host in inventory.get_hosts(self._play.hosts):
|
||||
self._host_states[host.name] = HostState(blocks=self._blocks)
|
||||
|
||||
def get_host_state(self, host):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue