Ansible role to mount GlusterFS volumes.
- centos 7
- ansible >= 2.2
$ ansible-galaxy install zaxos.glusterfs-client-ansible-role
- hosts: servers
vars:
glusterfs_version: "3.10"
glusterfs_volumes:
- volume: volume1
state: present
nodes:
- node1.glusterfs.example
- node2.glusterfs.example
mount:
path: /mnt/volume1
owner: exampleuser
group: examplegroup
mode: "0770"
roles:
- role: zaxos.glusterfs-client-ansible-role
- volume: example
state: present/absent # optional, default is 'present', set to 'absent' for removal #
nodes: # required, glusterfs nodes list #
- node1
- node2
- ...
mount: # required #
path: # required #
owner: # optional, default is "root" #
group: # optional, default is "root" #
mode: # optional, default is "0755" #
options: # optional, default is "defaults,_netdev,backupvolfile-server=..." #
Some variables that require review:
glusterfs_version
: GlusterFS client version to be installed using CentOS Storage SIG Packages. Latest stable version is "3.10".glusterfs_volumes
: List of volumes.glusterfs_auto_remount
: Default value is "True". If set to "True", when the mount path of a volume is changed, the old mount path will be automatically unmounted and removed from fstab.