dellemc / dellemc.powerstore / 1.3.0 / module / dellemc_powerstore_quota Manage Tree Quotas and User Quotas on PowerStore. | "added in version" 1.1.0 of dellemc.powerstore" Authors: P Srinivas Rao (@srinivas-rao5) <ansible.team@dell.com> preview | supported by communitydellemc.powerstore.dellemc_powerstore_quota (1.3.0) — module
Install with ansible-galaxy collection install dellemc.powerstore:==1.3.0
collections: - name: dellemc.powerstore version: 1.3.0
Managing Quotas on Powerstore storage system includes getting details, modifying, creating and deleting Quotas.
- name: Create a Quota for a User using unix name dellemc_powerstore_quota: array_ip: "{{array_ip}}" verifycert: "{{verify_cert}}" user: "{{user}}" password: "{{password}}" quota_type: "user" unix_name: "{{unix_name}}" filesystem: "sample_fs" nas_server: "{{nas_server_id}}" quota: soft_limit: 5 hard_limit: 10 cap_unit: "TB" state: "present"
- name: Create a Tree Quota dellemc_powerstore_quota: array_ip: "{{array_ip}}" verifycert: "{{verify_cert}}" user: "{{user}}" password: "{{password}}" quota_type: "tree" path: "/home" filesystem: "sample_fs" nas_server: "sample_nas_server" quota: soft_limit: 5 hard_limit: 10 cap_unit: "TB" state: "present"
- name: Modify attributes for Tree Quota dellemc_powerstore_quota: array_ip: "{{array_ip}}" verifycert: "{{verify_cert}}" user: "{{user}}" password: "{{password}}" quota_id: "{{quota_id}}" quota: soft_limit: 10 hard_limit: 15 cap_unit: "TB" state: "present"
- name: Get details of User Quota dellemc_powerstore_quota: array_ip: "{{array_ip}}" verifycert: "{{verify_cert}}" user: "{{user}}" password: "{{password}}" quota_type: "user" uid: 100 path: "/home" filesystem: "{{filesystem_id}}" state: "present"
- name: Get details of Tree Quota dellemc_powerstore_quota: array_ip: "{{array_ip}}" verifycert: "{{verify_cert}}" user: "{{user}}" password: "{{password}}" quota_id: "{{quota_id}}" state: "present"
- name: Delete a Tree Quota dellemc_powerstore_quota: array_ip: "{{array_ip}}" verifycert: "{{verify_cert}}" user: "{{user}}" password: "{{password}}" quota_type: "tree" path: "/home" filesystem: "sample_fs" nas_server: "sample_nas_server" state: "absent"
uid: description: - The ID of the unix user account for which quota operations will be performed. - Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'. type: int path: description: - The path on which the quota will be imposed. - Path is relative to the root of the filesystem. - For user quota, if path is not specified, quota will be created at the root of the filesystem. type: str user: description: - The username of the PowerStore host. required: true type: str quota: description: - Specifies Quota parameters. suboptions: cap_unit: choices: - GB - TB default: GB description: - Unit of storage for the hard and soft limits. - This parameter is required if limit is specified. type: str hard_limit: description: - Hard limit of the user quota. - No hard limit when set to 0. type: int soft_limit: description: - Soft limit of the User/Tree quota. - No Soft limit when set to 0. type: int type: dict state: choices: - absent - present description: - Define whether the Quota should exist or not. - present indicates that the Quota should exist on the system. - absent indicates that the Quota should not exist on the system. required: true type: str array_ip: description: - IP or FQDN of the PowerStore management system. required: true type: str password: description: - The password of the PowerStore host. required: true type: str quota_id: description: - Id of the user/tree quota. - If quota_id is mentioned, then path/nas_server/file_system/quota_type is not required. type: str unix_name: description: - The name of the unix user account for which quota operations will be performed. - Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'. type: str filesystem: description: - The ID/Name of the filesystem for which the Tree/User Quota will be created. - If filesystem name is specified, then nas_server is required to uniquely identify the filesystem. type: str nas_server: description: - The NAS server. This could be the name or ID of the NAS server. type: str quota_type: choices: - user - tree description: - The type of quota which will be imposed. type: str verifycert: choices: - true - false description: - Boolean variable to specify whether to validate SSL certificate or not. - True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. - False - indicates that the SSL certificate should not be verified. required: true type: bool description: description: - Additional information that can be mentioned for a Tree Quota. - Description parameter can only be used when quota_type is 'tree' type: str windows_sid: description: - The SID of the Windows User account for which quota operations will be performed. - Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'. type: str windows_name: description: - The name of the Windows User for which quota operations will be performed. - The name should be mentioned along with Domain Name as 'DOMAIN_NAME\user_name' or as "DOMAIN_NAME\\user_name". - Any one among uid/unix_name/windows_name/windows_sid is required when quota_type is 'user'. type: str
changed: description: Whether or not the resource has changed returned: always sample: true type: bool quota_details: contains: description: description: Additional information about the tree quota. Only applicable for Tree Quotas. sample: Sample Tree quota's description type: str file_system: contains: filesystem_type: description: Type of filesystem. sample: Primary type: str id: description: ID of filesystem. sample: 5f73f516-e67b-b179-8901-72114981c1f3 type: str name: description: Name of filesystem. sample: sample_filesystem type: str nas_server: description: nas_server of filesystem. type: dict description: Includes ID and Name of filesystem and nas server for which smb share exists. type: complex hard_limit(cap_unit): description: Value of the Hard Limit imposed on the quota. sample: '4.0' type: int id: description: The ID of the Quota. sample: 2nQKAAEAAAAAAAAAAAAAQIMCAAAAAAAA type: str remaining_grace_period: description: The time period remaining after which the grace period will expire. sample: 86400 type: int size_used: description: Size currently consumed by Tree/User on the filesystem. type: int soft_limit(cap_unit): description: Value of the Soft Limit imposed on the quota. sample: '2.0' type: int state: description: State of the user quota or tree quota record period. OK means No quota limits are exceeded. Soft_Exceeded means Soft limit is exceeded, and grace period is not expired. Soft_Exceeded_And_Expired means Soft limit is exceeded, and grace period is expired. Hard_Reached means Hard limit is reached. sample: Ok type: str state_l10n: description: Localized message string corresponding to state. sample: Ok type: str tree_quota_for_user_quota: contains: description: description: Description of Tree Quota for user quota. sample: Primary type: str hard_limit(cap_unit): description: Value of the Hard Limit imposed on the quota. sample: '2.0' type: int path: description: The path on which the quota will be imposed. sample: /sample_path type: str description: Additional Information of Tree Quota limits on which user quota exists. Only applicable for User Quotas. type: complex tree_quota_id: description: ID of the Tree Quota on which the specific User Quota exists. Only applicable for user quotas. type: str uid: description: The ID of the unix host for which user quota exists. Only applicable for user quotas. type: int unix_name: description: The Name of the unix host for which user quota exists. Only applicable for user quotas. type: str windows_name: description: The Name of the Windows host for which user quota exists. Only applicable for user quotas. type: str windows_sid: description: The SID of the windows host for which user quota exists. Only applicable for user quotas. type: str description: The quota details. returned: When Quota exists. type: complex