avoid chroot paths (#32778)
* avoid chroot paths fixes #32764 * check name
This commit is contained in:
parent
7a82c49a5f
commit
e7941b0d4e
1 changed files with 25 additions and 23 deletions
|
@ -74,6 +74,8 @@ class VarsModule(BaseVarsPlugin):
|
||||||
else:
|
else:
|
||||||
raise AnsibleParserError("Supplied entity must be Host or Group, got %s instead" % (type(entity)))
|
raise AnsibleParserError("Supplied entity must be Host or Group, got %s instead" % (type(entity)))
|
||||||
|
|
||||||
|
# avoid 'chroot' type inventory hostnames /path/to/chroot
|
||||||
|
if not entity.name.startswith(os.path.sep):
|
||||||
try:
|
try:
|
||||||
found_files = []
|
found_files = []
|
||||||
# load vars
|
# load vars
|
||||||
|
|
Loading…
Reference in a new issue