- Docs »
- gluster_volume - Manage GlusterFS volumes
-
You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation.
gluster_volume - Manage GlusterFS volumes
- Create, remove, start, stop and tune GlusterFS volumes
Parameter |
Choices/Defaults |
Comments |
arbiters
(added in 2.3) |
|
Arbiter count for volume.
|
bricks
|
|
Brick paths on servers. Multiple brick paths can be separated by commas.
aliases: brick
|
cluster
|
|
List of hosts to use for probing and brick setup.
|
directory
|
|
Directory for limit-usage.
|
disperses
(added in 2.2) |
|
Disperse count for volume.
|
force
bool |
|
If brick is being created in the root partition, module will fail. Set force to true to override this behaviour.
|
host
|
|
Override local hostname (for peer probing purposes).
|
name
required |
|
The volume name.
|
options
|
|
A dictionary/hash with options/settings for the volume.
|
quota
|
|
Quota value for limit-usage (be sure to use 10.0MB instead of 10MB, see quota list).
|
rebalance
bool |
|
Controls whether the cluster is rebalanced after changes.
|
redundancies
(added in 2.2) |
|
Redundancy count for volume.
|
replicas
|
|
Replica count for volume.
|
start_on_create
bool |
|
Controls whether the volume is started after creation or not.
|
state
required |
Choices:
- absent
- present
- started
- stopped
|
Use present/absent ensure if a volume exists or not. Use started/stopped to control its availability.
|
stripes
|
|
Stripe count for volume.
|
transport
|
Choices:
tcp ←
- rdma
- tcp,rdma
|
Transport type for volume.
|
Note
- Requires cli tools for GlusterFS on servers.
- Will add new bricks, but not remove them.
- name: create gluster volume
gluster_volume:
state: present
name: test1
bricks: /bricks/brick1/g1
rebalance: yes
cluster:
- 192.0.2.10
- 192.0.2.11
run_once: true
- name: tune
gluster_volume:
state: present
name: test1
options:
performance.cache-size: 256MB
- name: Set multiple options on GlusterFS volume
gluster_volume:
state: present
name: test1
options:
{ performance.cache-size: 128MB,
write-behind: 'off',
quick-read: 'on'
}
- name: start gluster volume
gluster_volume:
state: started
name: test1
- name: limit usage
gluster_volume:
state: present
name: test1
directory: /foo
quota: 20.0MB
- name: stop gluster volume
gluster_volume:
state: stopped
name: test1
- name: remove gluster volume
gluster_volume:
state: absent
name: test1
- name: create gluster volume with multiple bricks
gluster_volume:
state: present
name: test2
bricks: /bricks/brick1/g2,/bricks/brick2/g2
cluster:
- 192.0.2.10
- 192.0.2.11
run_once: true
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.