Hello,

I would like to discuss the idea for a hierarchic structure for the 
inventory. Would it possible to support something like that?

For example with this structure:

| server
| -- atlanta
|    `-- web
|       `--hosts:web1
| -- raleigh
|    `-- web
|        `-- host:web2

You would need this config:
{
  "web" : { "hosts": [ "web1", "web2" ] },
  "server" : { "hosts": [ "web1", "web2" ] },
  "atlanta" : { "hosts": [ "web1" ] },
  "raleigh" : { "hosts": [ "web2" ] }
}


To work with "children" the group names would have to be unique in the 
whole tree. So "web" would break this up.

Wouldn't it be nice to use something like that?
{
  "server" 
  { "atlanta" { "web" {"hosts": [ "web1" ] } } },
  { "raleigh" { "web" {"hosts": [ "web2" ] } } }
}

I came up with this by using a KeePass database as inventory source:
https://github.com/escoreal/ansible_kdb_inventory
Here I have to build the tree for each host and add it to all parents. But 
this doesn't scale to well.

Thanks,
esco





-- 
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/b41a7c85-dff6-4b51-963d-8ebd57b239e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to