W3cubDocs

/Ansible 2.11

community.general.gluster_volume – Manage GlusterFS volumes

Note

This plugin is part of the community.general collection (version 2.0.1).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.gluster_volume.

DEPRECATED

Removed in

version 3.0.0

Why

The gluster modules have migrated to the gluster.gluster collection.

Alternative

Use gluster.gluster.gluster_volume instead.

Synopsis

  • Create, remove, start, stop and tune GlusterFS volumes

Parameters

Parameter Choices/Defaults Comments
arbiters
string
Arbiter count for volume.
bricks
string
Brick paths on servers. Multiple brick paths can be separated by commas.

aliases: brick
cluster
string
List of hosts to use for probing and brick setup.
directory
string
Directory for limit-usage.
disperses
string
Disperse count for volume.
force
boolean
    Choices:
  • no
  • yes
If brick is being created in the root partition, module will fail. Set force to true to override this behaviour.
host
string
Override local hostname (for peer probing purposes).
name
string / required
The volume name.

aliases: volume
options
string
A dictionary/hash with options/settings for the volume.
quota
string
Quota value for limit-usage (be sure to use 10.0MB instead of 10MB, see quota list).
rebalance
boolean
    Choices:
  • no
  • yes
Controls whether the cluster is rebalanced after changes.
redundancies
string
Redundancy count for volume.
replicas
string
Replica count for volume.
start_on_create
boolean
    Choices:
  • no
  • yes
Controls whether the volume is started after creation or not.
state
string / required
    Choices:
  • absent
  • present
  • started
  • stopped
Use present/absent ensure if a volume exists or not. Use started/stopped to control its availability.
stripes
string
Stripe count for volume.
transport
string
    Choices:
  • tcp
  • rdma
  • tcp,rdma
Transport type for volume.

Notes

Note

  • Requires cli tools for GlusterFS on servers.
  • Will add new bricks, but not remove them.

Examples

- name: Create gluster volume
  community.general.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
  community.general.gluster_volume:
    state: present
    name: test1
    options:
      performance.cache-size: 256MB

- name: Set multiple options on GlusterFS volume
  community.general.gluster_volume:
    state: present
    name: test1
    options:
      { performance.cache-size: 128MB,
        write-behind: 'off',
        quick-read: 'on'
      }

- name: Start gluster volume
  community.general.gluster_volume:
    state: started
    name: test1

- name: Limit usage
  community.general.gluster_volume:
    state: present
    name: test1
    directory: /foo
    quota: 20.0MB

- name: Stop gluster volume
  community.general.gluster_volume:
    state: stopped
    name: test1

- name: Remove gluster volume
  community.general.gluster_volume:
    state: absent
    name: test1

- name: Create gluster volume with multiple bricks
  community.general.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
  community.general.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
  community.general.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

Status

  • This module will be removed in version 3.0.0. [deprecated]
  • For more information see DEPRECATED.

Authors

  • Taneli Leppä (@rosmo)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/gluster_volume_module.html