Re: [ansible-project] Re: tree/hierarchic structure for inventory?

2016-05-11 Thread Krzysztof Zarzycki
If someone come up with a solution (like a dynamic inventory script that reads some inverted inventory dsl), please share, I would be very interested! I see the need for such inverted inventory in the case, where I have a lot of interconnected services, where number of services is really

Re: [ansible-project] Re: tree/hierarchic structure for inventory?

2015-09-07 Thread esco real
If someone is interested in this topic: Now, I use the name and the UUID of the groups (name_uuid) to build up the tree (children, group_vars..). So group names don't have to be unique and performance and scaling isn't a problem anymore.. If you use a CMDB your groups usually would have some

Re: [ansible-project] Re: tree/hierarchic structure for inventory?

2015-07-29 Thread esco real
Hello Martin, you are right. Supporting a tree structure for this with plain files/directories (group_vars..) wouldn't be that nice. And it is very sensible at the moment. But I made this work for me by resolving the group_vars in the tree directly to host_vars. So group names don't have to

Re: [ansible-project] Re: tree/hierarchic structure for inventory?

2015-07-22 Thread Martin
Hi, yes the host and group variables are the most important thing and I'd personally go and separate them out to the group_vars/ and host_vars/ directories. That is just a matter preference. I have no emotional attachement to the the file format. I'm just saying that I saw this format

Re: [ansible-project] Re: tree/hierarchic structure for inventory?

2015-07-22 Thread esco real
Hello, to build a tree with ini format I think something like that could be used: [server.atlanta.web] web1 [server.raleigh.web] web2 esco -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving

Re: [ansible-project] Re: tree/hierarchic structure for inventory?

2015-07-21 Thread Paul Markham
Hi Martin, I originally had the inventory in yaml format, but changed to ini format for some reason (which I can't remember). The clusterssh format would work well if you just wanted the host and group relationships, but I also wanted to support host and group variables like the default static

Re: [ansible-project] Re: tree/hierarchic structure for inventory?

2015-07-21 Thread Martin
Hi Paul, I think the inverted inventory is a *great idea*. IIRC clusterssh went from a format that was similiar to the normal ansible inventory to something like this: node1 group1,group2,group3 node2 group3 node3 group1,group3 I think that this is a more natural way of specifying it rather

[ansible-project] Re: tree/hierarchic structure for inventory?

2015-07-19 Thread esco real
Hello Paul, yes, I did likely the same but used a KeePass 2 database instead of an ini file as inventory source. So here we have similar thoughts (if you are using KeePass 2 you should try my script ;) ). Adding each host to his parents is possible. But apart from the scaling problem you would

[ansible-project] Re: tree/hierarchic structure for inventory?

2015-07-18 Thread Paul Markham
You can write a dynamic inventory script which allows you to specify the inventory in another format, or fetch it from a configuration management database. I'm not sure if this is exactly what you want, but I wrote one that lets you specify servers and which parent groups they belong in;