gluster_volume - Manage GlusterFS volumes
New in version 1.9.
Synopsis
- Create, remove, start, stop and tune GlusterFS volumes
Options
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| arbiter (added in 2.3)
| no | Arbiter count for volume | ||
| bricks | no | Brick paths on servers. Multiple brick paths can be separated by commas. aliases: brick | ||
| cluster | no | List of hosts to use for probing and brick setup | ||
| directory | no | Directory for limit-usage | ||
| disperses (added in 2.2)
| no | Disperse count for volume | ||
| force | no |
| If brick is being created in the root partition, module will fail. Set force to true to override this behaviour. | |
| host | no | Override local hostname (for peer probing purposes) | ||
| name | yes | The volume name | ||
| options | no | A dictionary/hash with options/settings for the volume | ||
| quota | no | Quota value for limit-usage (be sure to use 10.0MB instead of 10MB, see quota list) | ||
| rebalance | no | no |
| Controls whether the cluster is rebalanced after changes |
| redundancies (added in 2.2)
| no | Redundancy count for volume | ||
| replicas | no | Replica count for volume | ||
| start_on_create | no | yes |
| Controls whether the volume is started after creation or not |
| state | yes |
| Use present/absent ensure if a volume exists or not. Use started/stopped to control its availability. | |
| stripes | no | Stripe count for volume | ||
| transport | no | tcp |
| Transport type for volume |
Examples
- 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: 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
Notes
Note
- Requires cli tools for GlusterFS on servers
- Will add new bricks, but not remove them
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/gluster_volume_module.html