Remove support for erroneous host_vars and group_vars

These are now host-vars and group-vars.

Change-Id: I68ccb922cdc58f40bf0bf02614de78fdb17976b4
This commit is contained in:
James E. Blair 2018-02-20 13:56:40 -08:00
parent 58320a49b1
commit ec1f54deb3
2 changed files with 4 additions and 6 deletions

View File

@ -138,10 +138,10 @@
- host3
vars:
allvar: all
host_vars:
host-vars:
host1:
hostvar: host
group_vars:
group-vars:
group1:
groupvar: group

View File

@ -512,8 +512,6 @@ class JobParser(object):
'roles': to_list(role),
'required-projects': to_list(vs.Any(job_project, str)),
'vars': dict,
'host_vars': {str: dict},
'group_vars': {str: dict},
'host-vars': {str: dict},
'group-vars': {str: dict},
'dependencies': to_list(str),
@ -750,14 +748,14 @@ class JobParser(object):
raise Exception("Variables named 'zuul' or 'nodepool' "
"are not allowed.")
job.variables = variables
host_variables = conf.get('host-vars', conf.get('host_vars', None))
host_variables = conf.get('host-vars', None)
if host_variables:
for host, hvars in host_variables.items():
if 'zuul' in hvars or 'nodepool' in hvars:
raise Exception("Variables named 'zuul' or 'nodepool' "
"are not allowed.")
job.host_variables = host_variables
group_variables = conf.get('group-vars', conf.get('group_vars', None))
group_variables = conf.get('group-vars', None)
if group_variables:
for group, gvars in group_variables.items():
if 'zuul' in group_variables or 'nodepool' in gvars: