mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Merge pull request #865 from jdavisp3/vars-file
Always load group_vars and host_vars.
This commit is contained in:
commit
7d50a5c2b7
6 changed files with 27 additions and 12 deletions
|
@ -284,7 +284,6 @@ class PlayBook(object):
|
|||
# let runner template out future commands
|
||||
setup_ok = setup_results.get('contacted', {})
|
||||
for (host, result) in setup_ok.iteritems():
|
||||
facts = result.get('ansible_facts', {})
|
||||
self.SETUP_CACHE[host] = result.get('ansible_facts', {})
|
||||
return setup_results
|
||||
|
||||
|
@ -299,14 +298,12 @@ class PlayBook(object):
|
|||
self.callbacks.on_play_start(play.name)
|
||||
|
||||
# get facts from system
|
||||
rc = self._do_setup_step(play)
|
||||
self._do_setup_step(play)
|
||||
|
||||
# now with that data, handle contentional variable file imports!
|
||||
if play.vars_files and len(play.vars_files) > 0:
|
||||
play.update_vars_files(self.inventory.list_hosts(play.hosts))
|
||||
play.update_vars_files(self.inventory.list_hosts(play.hosts))
|
||||
|
||||
for task in play.tasks():
|
||||
|
||||
# only run the task if the requested tags match
|
||||
should_run = False
|
||||
for x in self.only_tags:
|
||||
|
@ -323,4 +320,3 @@ class PlayBook(object):
|
|||
self.inventory.restrict_to(handler.notified_by)
|
||||
self._run_task(play, handler, True)
|
||||
self.inventory.lift_restriction()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue