summaryrefslogtreecommitdiff
path: root/lib/ansible/vars/manager.py
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2018-01-24 09:44:55 -0600
committerGitHub <noreply@github.com>2018-01-24 09:44:55 -0600
commit1ac04ba52e0342bcca8d7cec8df330b507974865 (patch)
tree382d4a2212fef095743ec7fdb89c342eaef3835d /lib/ansible/vars/manager.py
parent005a8278c607987539aedbe9e8efdfda50d05d49 (diff)
downloadansible-1ac04ba52e0342bcca8d7cec8df330b507974865.tar.gz
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
Diffstat (limited to 'lib/ansible/vars/manager.py')
-rw-r--r--lib/ansible/vars/manager.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/vars/manager.py b/lib/ansible/vars/manager.py
index 8d3110b705..09e8c400ad 100644
--- a/lib/ansible/vars/manager.py
+++ b/lib/ansible/vars/manager.py
@@ -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)