Can group_vars have nested sub-directories? For example, can I have directories for groups “group_one” and “group_two” like this:
`
group_vars/
all
group_one/
all
foo
bar
group_two/
all
foo
bar
`
Thanks,
-T
Can group_vars have nested sub-directories? For example, can I have directories for groups “group_one” and “group_two” like this:
`
group_vars/
all
group_one/
all
foo
bar
group_two/
all
foo
bar
`
Thanks,
-T
Yes, up to one level.
Thanks for the reply.
I’m not sure what “one level” means. If I read the docs correctly, the group_vars dir can (should?) be inside the inventory directory. If that is true, then how can one level work?
-T
One level means
group_vars/foo.yml
or group_vars/foo/a.yml and group_vars/foo/b.yml
is ok
group_vars/foo/some_directory/a.yml
will not find the data in a.yml
I'm not sure what "one level" means.
I mean, for a group 'tomcat' you can have a file tomcat, OR a dirctory
tomcat. You cannot have another directory beneath tomcat.
If I read the docs correctly, the group_vars dir can (should?) be inside
the inventory directory. If that is true, then how can one level work?
group_vars should be in the inventory directory yes.
Thanks, guys.
-T