Redirecting from -devel as advised.

On Fri, Nov 14, 2014 at 6:19 AM, Thomas Quinot <[email protected]> wrote:

> As far as I understand the current state of source code, ansible_hosts
> can be:
>   * the path to a dynamic inventory program
>   * the path to a static inventory file
>   * the path to an inventory directory, from which dynamic inventory
>     scripts and static inventory files are launched
>   * a comma-separated list of host names
>
> In my usage context, several distinct applications are managed through
> Ansible, each with its own subset of hosts, and its own host grouping
> needs. So, I would like to have a two-level inventoy with:
>   * a shared, company one inventory listing all hosts and setting
>     common host variables
>   * AND an application specific inventory for each application,
>     providing additional application specific host groups (and
>     possibly variables).
>
> I think it would be possible to implement that with minimal fuss
> by minimally tweaking the semantics of ansible_hosts so that it could
> be:
>
>    * the path to a dynamic inventory program
>    * the path to a static inventory file
>    * the path to an inventory directory, from which dynamic inventory
>      scripts and static inventory files are launched
>    * a host name
> OR * a comma-separated list of /any of the above/
>
> I could thus set in a shared configuration:
>
>   ansible_hosts=/path/to/companywide/inventory,appspecific_inventory
>
> where /path/to/companywide/inventory would be the company-wide
> shared inventory, and "appspecific_inventory", being a relative path,
> would be interpreted relative to the current directory and contain the
> application specific data.
>
> Thoughts?

(Again, I'm willing to start work on the implementation if there is
interest in this feature. :) ).

Thomas.

-- 
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/20141114210040.GC98767%40melamine.cuivre.fr.eu.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to