mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Clean up some extra_vars redundancy
This commit is contained in:
parent
57cac788fb
commit
57e51f7fdf
1 changed files with 4 additions and 6 deletions
|
@ -184,9 +184,6 @@ class Play(object):
|
|||
else:
|
||||
vars.update(self.vars)
|
||||
|
||||
if type(self.playbook.extra_vars) == dict:
|
||||
vars.update(self.playbook.extra_vars)
|
||||
|
||||
if type(self.vars_prompt) == list:
|
||||
for var in self.vars_prompt:
|
||||
if not 'name' in var:
|
||||
|
@ -218,9 +215,10 @@ class Play(object):
|
|||
else:
|
||||
raise errors.AnsibleError("'vars_prompt' section is malformed, see docs")
|
||||
|
||||
results = self.playbook.extra_vars.copy()
|
||||
results.update(vars)
|
||||
return results
|
||||
if type(self.playbook.extra_vars) == dict:
|
||||
vars.update(self.playbook.extra_vars)
|
||||
|
||||
return vars
|
||||
|
||||
# *************************************************
|
||||
|
||||
|
|
Loading…
Reference in a new issue