community / community.general / 0.2.1 / module / gluster_volume Manage GlusterFS volumes Authors: Taneli Leppä (@rosmo)community.general.gluster_volume (0.2.1) — module
Install with ansible-galaxy collection install community.general:==0.2.1
collections: - name: community.general version: 0.2.1
Create, remove, start, stop and tune GlusterFS volumes
- 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
- name: Remove the bricks from gluster volume gluster_volume: state: present name: testvol bricks: /bricks/brick1/b1,/bricks/brick2/b2 cluster: - 10.70.42.85 force: true run_once: true
- name: Reduce cluster configuration gluster_volume: state: present name: testvol bricks: /bricks/brick3/b1,/bricks/brick4/b2 replicas: 2 cluster: - 10.70.42.85 force: true run_once: true
host: description: - Override local hostname (for peer probing purposes). name: aliases: - volume description: - The volume name. required: true force: description: - If brick is being created in the root partition, module will fail. Set force to true to override this behaviour. type: bool quota: description: - Quota value for limit-usage (be sure to use 10.0MB instead of 10MB, see quota list). state: choices: - absent - present - started - stopped description: - Use present/absent ensure if a volume exists or not. Use started/stopped to control its availability. required: true bricks: aliases: - brick description: - Brick paths on servers. Multiple brick paths can be separated by commas. cluster: description: - List of hosts to use for probing and brick setup. options: description: - A dictionary/hash with options/settings for the volume. stripes: description: - Stripe count for volume. arbiters: description: - Arbiter count for volume. replicas: description: - Replica count for volume. directory: description: - Directory for limit-usage. disperses: description: - Disperse count for volume. rebalance: default: 'no' description: - Controls whether the cluster is rebalanced after changes. type: bool transport: choices: - tcp - rdma - tcp,rdma default: tcp description: - Transport type for volume. redundancies: description: - Redundancy count for volume. start_on_create: default: 'yes' description: - Controls whether the volume is started after creation or not. type: bool