Open brainfunked opened 6 years ago
Why is gadmin maintaining inventory files - wouldn't this run the risk of getting out of sync?
My understanding was the gadmin would generate the inventory files for every command on a need basis, not store per cluster for further use.
gadmin executes ansible roles. These need to be executed against an inventory of hosts. gadmin itself needs to know the cluster hosts, their roles and the endpoints to contact etc. The logical choice is for gadmin to maintain this data in the form of ansible inventory.
gadmin supports multiple clusters. Instead of writing all the information about all the clusters to a single inventory file, it would be beneficial to use a directory based layout with the inventory files themselves being YAML. This makes it easier for the administrator to maintain individual clusters' inventory separately, if manually modified, and also for gadmin to update these files without touching the other clusters.
Here's the directory layout under
$GADMIN_HOME
:<cluster_name>
would be the name supplied by the user when defining a cluster.In the inventory itself, for every cluster a top level group of
<cluster_name>
would be defined. Here's an example YAML inventory file:The group names
monitoring
andsmb
are illustrative. The actual group names would be standardised as features are implemented in gadmin for different roles.gadmin needs to be able to read and write the inventory file based on this directory structure.