dellemc / dellemc.powerscale / 1.4.0 / module / dellemc_powerscale_smartquota Manage Smart Quotas on PowerScale | "added in version" 1.2.0 of dellemc.powerscale" Authors: P Srinivas Rao (@srinivas-rao5) <ansible.team@dell.com> preview | supported by communitydellemc.powerscale.dellemc_powerscale_smartquota (1.4.0) — module
Install with ansible-galaxy collection install dellemc.powerscale:==1.4.0
collections: - name: dellemc.powerscale version: 1.4.0
Manages Smart Quotas on a PowerScale storage system. This includes getting details, modifying, creating and deleting Smart Quotas.
- name: Create a Quota for a User excluding snapshot. dellemc_powerscale_smartquota: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" path: "<path>" quota_type: "user" user_name: "{{user_name}}" access_zone: "sample-zone" provider_type: "local" quota: include_overheads: False advisory_limit_size: "{{advisory_limit_size}}" soft_limit_size: "{{soft_limit_size}}" soft_grace_period: "{{soft_grace_period}}" period_unit: "{{period_unit}}" hard_limit_size: "{{hard_limit_size}}" cap_unit: "{{cap_unit}}" state: "present"
- name: Create a Quota for a Directory for accounting includes snapshots and data protection overheads. dellemc_powerscale_smartquota: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" path: "<path>" quota_type: "directory" quota: include_snapshots: "True" include_overheads: True state: "present"
- name: Create default-user Quota for a Directory with snaps and overheads dellemc_powerscale_smartquota: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" path: "<path>" quota_type: "default-user" quota: include_snapshots: "True" include_overheads: True state: "present"
- name: Get a Quota Details for a Group dellemc_powerscale_smartquota: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" path: "<path>" quota_type: "group" group_name: "{{user_name}}" access_zone: "sample-zone" provider_type: "local" quota: include_snapshots: "True" state: "present"
- name: Update Quota for a User dellemc_powerscale_smartquota: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" path: "<path>" quota_type: "user" user_name: "{{user_name}}" access_zone: "sample-zone" provider_type: "local" quota: include_snapshots: "True" include_overheads: True advisory_limit_size: "{{new_advisory_limit_size}}" hard_limit_size: "{{new_hard_limit_size}}" cap_unit: "{{cap_unit}}" state: "present"
- name: Modify Soft Limit and Grace period of default-user Quota dellemc_powerscale_smartquota: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" path: "<path>" quota_type: "default-user" access_zone: "sample-zone" quota: include_snapshots: "True" include_overheads: True soft_limit_size: "{{soft_limit_size}}" cap_unit: "{{cap_unit}}" soft_grace_period: "{{soft_grace_period}}" period_unit: "{{period_unit}}" state: "present"
- name: Delete a Quota for a Directory dellemc_powerscale_smartquota: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" path: "<path>" quota_type: "directory" quota: include_snapshots: "True" state: "absent"
- name: Delete Quota for a default-group dellemc_powerscale_smartquota: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" path: "<path>" quota_type: "default-group" quota: include_snapshots: "True" state: "absent"
path: description: - The path on which the quota will be imposed. - For system access zone, the path is absolute. For all other access zones, the path is a relative path from the base of the access zone. required: true type: str quota: description: - Specifies Smart Quota parameters. suboptions: advisory_limit_size: description: - The threshold value after which the advisory notification will be sent. type: int cap_unit: choices: - GB - TB description: - Unit of storage for the hard, soft and advisory limits. - This parameter is required if any of the hard, soft or advisory limits is specified. type: str hard_limit_size: description: - Threshold value after which a hard limit exceeded notification will be sent. - Write access will be restricted after the hard limit is exceeded. type: int include_overheads: description: - Whether to include the data protection overheads in the quota or not. - If not passed during quota creation then quota will be created excluding the overheads. - This parameter is supported for SDK 8.1.1 type: bool include_snapshots: default: false description: - Whether to include the snapshots in the quota or not. type: bool period_unit: choices: - days - weeks - months description: - Unit of the time period for soft_grace_period. - For months the number of days is assumed to be 30 days. - This parameter is required only if the soft_grace_period, is specified. type: str soft_grace_period: description: - Grace Period after the soft limit for quota is exceeded. - After the grace period, the write access to the quota will be restricted. - Both soft_grace_period and soft_limit_size are required to modify soft threshold for the quota. type: int soft_limit_size: description: - Threshold value after which the soft limit exceeded notification will be sent and the soft_grace period will start. - Write access will be restricted after the grace period expires. - Both soft_grace_period and soft_limit_size are required to modify soft threshold for the quota. type: int thresholds_on: choices: - app_logical_size - fs_logical_size - physical_size description: - For SDK 9.0.0 the parameter include_overheads is deprecated and thresholds_on is used. type: str type: dict state: choices: - absent - present description: - Define whether the Smart Quota should exist or not. - present - indicates that the Smart Quota should exist on the system. - absent - indicates that the Smart Quota should not exist on the system. required: true type: str port_no: default: '8080' description: - Port number of the PowerScale cluster.It defaults to 8080 if not specified. required: false type: str api_user: description: - username of the PowerScale cluster. required: true type: str user_name: description: - The name of the user account for which quota operations will be performed. type: str group_name: description: - The name of the group for which quota operations will be performed. type: str onefs_host: description: - IP address or FQDN of the PowerScale cluster. required: true type: str quota_type: choices: - user - group - directory - default-user - default-group description: - The type of quota which will be imposed on the path. required: true type: str verify_ssl: choices: - true - false description: - boolean variable to specify whether to validate SSL certificate or not. - True - indicates that the SSL certificate should be verified. - False - indicates that the SSL certificate should not be verified. required: true type: bool access_zone: default: system description: - This option mentions the zone in which the user/group exists. - For a non-system access zone, the path relative to the non-system Access Zone's base directory has to be given. - For a system access zone, the absolute path has to be given. type: str api_password: description: - the password of the PowerScale cluster. required: true type: str provider_type: choices: - local - file - ldap - ads default: local description: - This option defines the type which is used to authenticate the user/group. - If the provider_type is 'ads' then the domain name of the Active Directory Server has to be mentioned in the user_name. The format for the user_name should be 'DOMAIN_NAME\user_name' or "DOMAIN_NAME\\user_name". - This option acts as a filter for all operations except creation. type: str
changed: description: Whether or not the resource has changed returned: always sample: true type: bool quota_details: contains: enforced: description: Whether the limits are enforced on Quota or not. sample: true type: bool id: description: The ID of the Quota. sample: 2nQKAAEAAAAAAAAAAAAAQIMCAAAAAAAA type: str thresholds: description: Includes information about all the limits imposed on quota. The limits are mentioned in bytes and soft_grace is in seconds. sample: advisory: 3221225472 advisory(GB): '3.0' advisory_exceeded: false advisory_last_exceeded: 0 hard: 6442450944 hard(GB): '6.0' hard_exceeded: false hard_last_exceeded: 0 soft: 5368709120 soft(GB): '5.0' soft_exceeded: false soft_grace: 3024000 soft_last_exceeded: 0 type: dict type: description: The type of Quota. sample: directory type: str usage: description: The Quota usage. sample: inodes: 1 logical: 0 physical: 2048 type: dict description: The quota details. returned: When Quota exists. type: complex