mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-01 19:54:24 -07:00
warn when examined group_vars is not dir
This commit is contained in:
parent
0f4ca877ac
commit
6f5ecb7efd
1 changed files with 4 additions and 1 deletions
|
@ -781,7 +781,10 @@ class Inventory(object):
|
||||||
path = os.path.realpath(os.path.join(basedir, 'group_vars'))
|
path = os.path.realpath(os.path.join(basedir, 'group_vars'))
|
||||||
found_vars = set()
|
found_vars = set()
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
found_vars = set(os.listdir(to_text(path)))
|
if os.path.isdir(path):
|
||||||
|
found_vars = set(os.listdir(to_text(path)))
|
||||||
|
else:
|
||||||
|
display.warning("Found group_vars that is not a directory, skipping: %s" % path)
|
||||||
return found_vars
|
return found_vars
|
||||||
|
|
||||||
def _find_host_vars_files(self, basedir):
|
def _find_host_vars_files(self, basedir):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue