If you're interested, the crux of the issue with the latest ansible is 
here: 
https://github.com/ansible/ansible/blob/8217c1c39c8de848550e2a6c816377f11cc60e9f/lib/ansible/inventory/__init__.py#L777-L785

Ansible is pre-loading a list of all the files in the group_vars directory 
one level deep. You can still assign your machine to a group named 
"one/two/three", but ansible will only have added a group_vars_file entry 
of "one" from the call to _find_group_vars_files. During variable lookup 
for the group "one/two/three" it checks for a group_vars_files entry of 
"one/two/three" 
(https://github.com/ansible/ansible/blob/8217c1c39c8de848550e2a6c816377f11cc60e9f/lib/ansible/inventory/__init__.py#L833).
 
When it finds none, it just moves on.

On Thursday, December 1, 2016 at 9:26:56 AM UTC-7, Devin Christensen wrote:
>
> The biggest caveat here is that groups with a slash (/) in the name no 
> longer work in the latest version of ansible. It treats everything up to 
> but excluding the first slash as the group name.
>
> We were doing this for a while but broke it out so there was no overlap by 
> having a prefix for each group that defined the group's scope, E.g.
>
> site/site1
> site/site2
> site-env/site1-prod
> site-env/site1-testing
> env/sand
> env/testing
>
> It's no longer hierarchical, but still takes advantage of folders for 
> organization, and you can set lookup priority by, E.g., making 
> site-env/site1-testing a child of the env/testing group.
>
> To make this compatible with the latest ansible, I replaced slashes with 
> underscores. It's not as pretty but it works.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to