mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
don't parse subdirs in host/group_vars
as those are not supported in core vars_plugins/group_vars.py but might be used by other vars_plugins
This commit is contained in:
parent
39f84b7f4d
commit
a6b827ca07
1 changed files with 2 additions and 2 deletions
|
@ -47,7 +47,7 @@ class VarsModule(object):
|
|||
p = os.path.join(basedir, "group_vars/%s" % x)
|
||||
paths = [p, '.'.join([p, 'yml']), '.'.join([p, 'yaml'])]
|
||||
for path in paths:
|
||||
if os.path.exists(path):
|
||||
if os.path.exists(path) and not os.path.isdir(path):
|
||||
data = utils.parse_yaml_from_file(path)
|
||||
if type(data) != dict:
|
||||
raise errors.AnsibleError("%s must be stored as a dictionary/hash" % path)
|
||||
|
@ -57,7 +57,7 @@ class VarsModule(object):
|
|||
p = os.path.join(basedir, "host_vars/%s" % host.name)
|
||||
paths = [p, '.'.join([p, 'yml']), '.'.join([p, 'yaml'])]
|
||||
for path in paths:
|
||||
if os.path.exists(path):
|
||||
if os.path.exists(path) and not os.path.isdir(path):
|
||||
data = utils.parse_yaml_from_file(path)
|
||||
if type(data) != dict:
|
||||
raise errors.AnsibleError("%s must be stored as a dictionary/hash" % path)
|
||||
|
|
Loading…
Reference in a new issue