Hi there,

I'd like to use Ansible for about 150 hosts, which have a few configs in 
common, but that are mostly very different config wise. For this we'd like 
to declare our group files/templates/vars outside of the actual role. 

Currently we'd like to create a /data/ directory outside of the roles that 
has a structure like so:
http://pastebin.com/raw.php?i=V6VrcdfN

Variable precedence should be: hosts > groups > generic (generic basically 
being defaults when there's nothing custom defined)

That way we can manage our groups/hosts more easily without having to 
search through all our roles to see if we have something custom defined for 
a group/host.

Alternatively we can also partially use the existing functionallity and 
extend group_vars with 
group_vars/<group_name>/<role_name>/{files,templates,vars}/, however are 
there built-in variables that point to the group_vars/<group_name>/ 
directory? And variables with the current role that is being executed? I 
think that is needed at least to try to include the variables (if the files 
exist) and define a path to search in for files/templates.

My questions are:
- Is managing it like this OK or is it discouraged? (why?)
- Is there an easy way to define "search paths" or should I use group_vars 
and host_vars to define the custom directories to search in for 
files/templates/vars?
- Is there perhaps a better/more common approach? A built-in group_files 
and group_templates just like group_vars would of course be great, but I 
couldn't find such an option. 

Thanks!
Niels


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7d084750-7f62-463d-b556-0cab3c34d373%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to