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:
Matt Martz 2018-01-24 09:44:55 -06:00 committed by GitHub
commit 1ac04ba52e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1 @@
posix/ci/group3

View file

@ -0,0 +1,9 @@
---
- hosts: all
gather_facts: false
tasks:
- name: Ensure we can see group_vars from path with comma
assert:
that:
- inventory_var_from_path_with_commas is defined
- inventory_var_from_path_with_commas == 'here'

View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -ux
ansible-playbook -i this,path,has,commas/hosts playbook.yml -v "$@"

View file

@ -0,0 +1 @@
inventory_var_from_path_with_commas: 'here'

View file

@ -0,0 +1 @@
localhost ansible_connect=local