dellemc / dellemc.powerscale / 3.0.0 / module / 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>dellemc.powerscale.smartquota (3.0.0) — module
Install with ansible-galaxy collection install dellemc.powerscale:==3.0.0
collections: - name: dellemc.powerscale version: 3.0.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: float 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 container: default: false description: If C(true), SMB shares using the quota directory see the quota thresholds as share size. type: bool 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: float 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 I(soft_grace_period). - For months the number of days is assumed to be 30 days. - This parameter is required only if the I(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 I(soft_grace_period) and I(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 I(soft_grace) period will start. - Write access will be restricted after the grace period expires. - Both I(soft_grace_period) and I(soft_limit_size) are required to modify soft threshold for the quota. type: float thresholds_on: choices: - app_logical_size - fs_logical_size - physical_size description: - For SDK 9.0.0 the parameter I(include_overheads) is deprecated and I(thresholds_on) is used. type: str type: dict state: choices: - absent - present description: - Define whether the Smart Quota should exist or not. - C(present) - indicates that the Smart Quota should exist on the system. - C(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. - C(true) - indicates that the SSL certificate should be verified. - C(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 - nis default: local description: - This option defines the type which is used to authenticate the user/group. - If the I(provider_type) is 'ads' then the domain name of the Active Directory Server has to be mentioned in the I(user_name). The format for the I(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: container: description: If C(true), SMB shares using the quota directory see the quota thresholds as share size. sample: true type: bool 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 I(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. sample: container: true description: '' efficiency_ratio: null enforced: false id: iddd include_snapshots: false labels: '' linked: false notifications: default path: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER persona: id: UID:9355 name: test_user_12 type: user ready: true reduction_ratio: null thresholds: advisory: null advisory_exceeded: false advisory_last_exceeded: null hard: null hard_exceeded: false hard_last_exceeded: null percent_advisory: null percent_soft: null soft: null soft_exceeded: false soft_grace: null soft_last_exceeded: null thresholds_on: applogicalsize type: user usage: applogical: 0 applogical_ready: true fslogical: 0 fslogical_ready: true fsphysical: 0 fsphysical_ready: false inodes: 0 inodes_ready: true physical: 0 physical_data: 0 physical_data_ready: true physical_protection: 0 physical_protection_ready: true physical_ready: true shadow_refs: 0 shadow_refs_ready: true type: complex