mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Don't skip an inventory source just because it has a comma (#35002)
* Don't skip an inventory source just because it has a comma, make sure it's also doesn't exist as a path. Fixes #34931 * Add integration test for inventory path with commas
This commit is contained in:
@@ -255,7 +255,7 @@ class VariableManager:
|
||||
''' merges all entities by inventory source '''
|
||||
data = {}
|
||||
for inventory_dir in self._inventory._sources:
|
||||
if ',' in inventory_dir: # skip host lists
|
||||
if ',' in inventory_dir and not os.path.exists(inventory_dir): # skip host lists
|
||||
continue
|
||||
elif not os.path.isdir(inventory_dir): # always pass 'inventory directory'
|
||||
inventory_dir = os.path.dirname(inventory_dir)
|
||||
|
||||
Reference in New Issue
Block a user