mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-26 07:51:44 -07:00
Merge pull request #110 from jhoekx/remote-vars
Always add vars to a play.
This commit is contained in:
commit
778fe8755f
1 changed files with 3 additions and 2 deletions
|
@ -91,8 +91,9 @@ class PlayBook(object):
|
||||||
|
|
||||||
def _get_vars(self, play, dirname):
|
def _get_vars(self, play, dirname):
|
||||||
''' load the vars section from a play '''
|
''' load the vars section from a play '''
|
||||||
|
if play.get('vars') is None:
|
||||||
vars = play.get('vars', {})
|
play['vars'] = {}
|
||||||
|
vars = play['vars']
|
||||||
if type(vars) != dict:
|
if type(vars) != dict:
|
||||||
raise errors.AnsibleError("'vars' section must contain only key/value pairs")
|
raise errors.AnsibleError("'vars' section must contain only key/value pairs")
|
||||||
vars_prompt = play.get('vars_prompt', {})
|
vars_prompt = play.get('vars_prompt', {})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue