gluster / gdeploy

gdeploy - an Ansible based tool to deploy GlusterFS
GNU General Public License v3.0
91 stars 69 forks source link

Specify list of hosts in separate inventory file #422

Open mbukatov opened 7 years ago

mbukatov commented 7 years ago

It's not possible to keep list of gluster servers and gluster configurations separate.

Version

gdeploy-2.0.2-7.noarch (from sac-gdeploy copr)

Current state

List of gluster machines is placed in a [hosts] section in gdeploy config file like this:

# This is a mandatory section, and hostnames/ip-address are listed one per line.

[hosts]
10.70.43.127
10.70.42.190
10.70.42.232
10.70.43.67

# Backend setup for all the hosts listed inside [hosts] section

[backend-setup]
devices=/dev/vdb
mountpoints=/gluster/brick1
brick_dirs=/gluster/brick1/one

Example comes from Write a config file to do the backend setup

So that everything is specified in a single file, which is passed to gdeploy like this:

$ gdeploy -c example.conf

Desired state

I'm able to keep the list of servers in a separate file:

$ cat glusterservers.hosts
10.70.43.127
10.70.42.190
10.70.42.232
10.70.43.67

so that the gluster config file would be just:

# Backend setup for all the hosts listed inside [hosts] section

[backend-setup]
devices=/dev/vdb
mountpoints=/gluster/brick1
brick_dirs=/gluster/brick1/one

and I would execute gdeploy like this:

$ gdeploy -i glusterservers.hosts -c example.conf
mbukatov commented 7 years ago

Does this feature make sense or do I miss something?