mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
Merge pull request #420 from bradobro/fix_no_varfiles
Test for play.vars_files == None, avoiding nasty traceback.
This commit is contained in:
commit
af9651f015
1 changed files with 2 additions and 1 deletions
|
@ -280,8 +280,9 @@ class PlayBook(object):
|
||||||
rc = self._do_setup_step(play) # pattern, vars, user, port, sudo, sudo_user, transport, None)
|
rc = self._do_setup_step(play) # pattern, vars, user, port, sudo, sudo_user, transport, None)
|
||||||
|
|
||||||
# now with that data, handle contentional variable file imports!
|
# now with that data, handle contentional variable file imports!
|
||||||
if len(play.vars_files) > 0:
|
if play.vars_files and len(play.vars_files) > 0:
|
||||||
rc = self._do_setup_step(play, play.vars_files)
|
rc = self._do_setup_step(play, play.vars_files)
|
||||||
|
#else: warn "You have a vars_files section but didn't state any vars files??
|
||||||
|
|
||||||
# run all the top level tasks, these get run on every node
|
# run all the top level tasks, these get run on every node
|
||||||
for task in play.tasks():
|
for task in play.tasks():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue