Deprecated

Removed in 3.0.0

i

Reason:The gluster modules have migrated to the gluster.gluster collection. | Alternative:Use M(gluster.gluster.gluster_volume) instead.

community.general.gluster_volume (2.5.9) — module

Manage GlusterFS volumes

Authors: Taneli Leppä (@rosmo)

Install collection

Install with ansible-galaxy collection install community.general:==2.5.9


Add to requirements.yml

  collections:
    - name: community.general
      version: 2.5.9

Description

Create, remove, start, stop and tune GlusterFS volumes

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Tune
  community.general.gluster_volume:
    state: present
    name: test1
    options:
      performance.cache-size: 256MB
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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'
      }
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Start gluster volume
  community.general.gluster_volume:
    state: started
    name: test1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Limit usage
  community.general.gluster_volume:
    state: present
    name: test1
    directory: /foo
    quota: 20.0MB
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Stop gluster volume
  community.general.gluster_volume:
    state: stopped
    name: test1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove gluster volume
  community.general.gluster_volume:
    state: absent
    name: test1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
host:
    description:
    - Override local hostname (for peer probing purposes).

name:
    aliases:
    - volume
    description:
    - The volume name.
    required: true

force:
    default: false
    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