community.general.xfs_quota (8.5.0) — module

Manage quotas on XFS filesystems

Authors: William Leemans (@bushvin)

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Configure quotas on XFS filesystems.

Before using this module /etc/projects and /etc/projid need to be configured.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set default project soft and hard limit on /opt of 1g
  community.general.xfs_quota:
    type: project
    mountpoint: /opt
    bsoft: 1g
    bhard: 1g
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove the default limits on /opt
  community.general.xfs_quota:
    type: project
    mountpoint: /opt
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set default soft user inode limits on /home of 1024 inodes and hard of 2048
  community.general.xfs_quota:
    type: user
    mountpoint: /home
    isoft: 1024
    ihard: 2048

Inputs

    
name:
    description:
    - The name of the user, group or project to apply the quota to, if other than default.
    type: str

type:
    choices:
    - user
    - group
    - project
    description:
    - The XFS quota type.
    required: true
    type: str

bhard:
    description:
    - Hard blocks quota limit.
    - This argument supports human readable sizes.
    type: str

bsoft:
    description:
    - Soft blocks quota limit.
    - This argument supports human readable sizes.
    type: str

ihard:
    description:
    - Hard inodes quota limit.
    type: int

isoft:
    description:
    - Soft inodes quota limit.
    type: int

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Whether to apply the limits or remove them.
    - When removing limit, they are set to 0, and not quite removed.
    type: str

rtbhard:
    description:
    - Hard realtime blocks quota limit.
    - This argument supports human readable sizes.
    type: str

rtbsoft:
    description:
    - Soft realtime blocks quota limit.
    - This argument supports human readable sizes.
    type: str

mountpoint:
    description:
    - The mount point on which to apply the quotas.
    required: true
    type: str

Outputs

bhard:
  description: the current bhard setting in bytes
  returned: always
  sample: 1024
  type: int
bsoft:
  description: the current bsoft setting in bytes
  returned: always
  sample: 1024
  type: int
ihard:
  description: the current ihard setting in bytes
  returned: always
  sample: 100
  type: int
isoft:
  description: the current isoft setting in bytes
  returned: always
  sample: 100
  type: int
rtbhard:
  description: the current rtbhard setting in bytes
  returned: always
  sample: 1024
  type: int
rtbsoft:
  description: the current rtbsoft setting in bytes
  returned: always
  sample: 1024
  type: int