dellemc / dellemc.unity / 2.0.0 / module / user_quota Manage user quota on the Unity storage system | "added in version" 1.2.0 of dellemc.unity" Authors: Spandita Panigrahi (@panigs7) <ansible.team@dell.com>dellemc.unity.user_quota (2.0.0) — module
Install with ansible-galaxy collection install dellemc.unity:==2.0.0
collections: - name: dellemc.unity version: 2.0.0
Managing User Quota on the Unity storage system includes Create user quota, Get user quota, Modify user quota, Delete user quota, Create user quota for quota tree, Modify user quota for quota tree and Delete user quota for quota tree.
- name: Get user quota details by user quota id dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" user_quota_id: "userquota_171798700679_0_123" state: "present"
- name: Get user quota details by user quota uid/user name dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" filesystem_name: "fs_2171" nas_server_id: "nas_21" user_name: "test" state: "present"
- name: Create user quota for a filesystem with filesystem id dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" filesystem_id: "fs_2171" hard_limit: 6 cap_unit: "TB" soft_limit: 5 uid: "111" state: "present"
- name: Create user quota for a filesystem with filesystem name dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" filesystem_name: "Test_filesystem" nas_server_name: "lglad068" hard_limit: 6 cap_unit: "TB" soft_limit: 5 uid: "111" state: "present"
- name: Modify user quota limit usage by user quota id dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" user_quota_id: "userquota_171798700679_0_123" hard_limit: 10 cap_unit: "TB" soft_limit: 8 state: "present"
- name: Modify user quota by filesystem id and user quota uid/user_name dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" filesystem_id: "fs_2171" user_type: "Windows" win_domain: "prod" user_name: "sample" hard_limit: 12 cap_unit: "TB" soft_limit: 10 state: "present"
- name: Delete user quota dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" filesystem_id: "fs_2171" win_domain: "prod" user_name: "sample" state: "absent"
- name: Create user quota of a quota tree dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" tree_quota_id: "treequota_171798700679_4" user_type: "Windows" win_domain: "prod" user_name: "sample" soft_limit: 9 cap_unit: "TB" state: "present"
- name: Create user quota of a quota tree by quota tree path dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" filesystem_id: "fs_2171" path: "/sample" user_type: "Unix" user_name: "test" hard_limit: 2 cap_unit: "TB" state: "present"
- name: Modify user quota of a quota tree dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" tree_quota_id: "treequota_171798700679_4" user_type: "Windows" win_domain: "prod" user_name: "sample" soft_limit: 10 cap_unit: "TB" state: "present"
- name: Modify user quota of a quota tree by quota tree path dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" filesystem_id: "fs_2171" path: "/sample" user_type: "Windows" win_domain: "prod" user_name: "sample" hard_limit: 12 cap_unit: "TB" state: "present"
- name: Delete user quota of a quota tree by quota tree path dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" filesystem_id: "fs_2171" path: "/sample" win_domain: "prod" user_name: "sample" state: "absent"
- name: Delete user quota of a quota tree by quota tree id dellemc.unity.user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" validate_certs: "{{validate_certs}}" tree_quota_id: "treequota_171798700679_4" win_domain: "prod" user_name: "sample" state: "absent"
uid: description: - User ID of the user quota. type: str path: description: - The path to the quota tree. - Either I(tree_quota_id) or I(path) to quota tree is required to create/modify/delete user quota for a quota tree. - Path must start with a forward slash '/'. type: str port: default: 443 description: - Port number through which communication happens with Unity management server. type: int state: choices: - absent - present description: - The I(state) option is used to mention the existence of the user quota. required: true type: str cap_unit: choices: - MB - GB - TB description: - Unit of I(soft_limit) and I(hard_limit) size. - It defaults to C(GB) if not specified. type: str password: description: - The password of the Unity management server. required: true type: str username: description: - The username of the Unity management server. required: true type: str user_name: description: - User name of the user quota when I(user_type) is C(Windows) or C(Unix). - Option I(user_name) must be specified along with I(win_domain) when I(user_type) is C(Windows). type: str user_type: choices: - Unix - Windows description: - Type of user creating a user quota. - Mandatory while creating or modifying user quota. type: str hard_limit: description: - Hard limitation for a user on the total space available. If exceeded, user cannot write data. - Value C(0) implies no limit. - One of the values of I(soft_limit) and I(hard_limit) can be C(0), however, both cannot be C(0) during creation or modification of user quota. type: int soft_limit: description: - Soft limitation for a user on the total space available. If exceeded, notification will be sent to the user for the grace period mentioned, beyond which the user cannot use space. - Value C(0) implies no limit. - Both I(soft_limit) and I(hard_limit) cannot be C(0) during creation or modification of user quota. type: int win_domain: description: - Fully qualified or short domain name for Windows user type. - Mandatory when I(user_type) is C(Windows). type: str filesystem_id: description: - The ID of the filesystem for which the user quota is created. - For creation of a user quota either I(filesystem_id) or I(filesystem_name) is required. type: str nas_server_id: description: - The ID of the NAS server in which the filesystem is created. - For creation of a user quota either I(filesystem_id) or I(filesystem_name) is required. type: str tree_quota_id: description: - The ID of the quota tree. - Either I(tree_quota_id) or I(path) to quota tree is required to create/modify/delete user quota for a quota tree. type: str unispherehost: description: - IP or FQDN of the Unity management server. required: true type: str user_quota_id: description: - User quota ID generated after creation of a user quota. type: str validate_certs: aliases: - verifycert default: true description: - Boolean variable to specify whether or not to validate SSL certificate. - C(true) - Indicates that the SSL certificate should be verified. - C(false) - Indicates that the SSL certificate should not be verified. type: bool filesystem_name: description: - The name of the filesystem for which the user quota is created. - For creation of a user quota either I(filesystem_name) or I(filesystem_id) is required. type: str nas_server_name: description: - The name of the NAS server in which the filesystem is created. - For creation of a user quota either I(nas_server_name) or I(nas_server_id) is required. type: str
changed: description: Whether or not the resource has changed. returned: always sample: true type: bool get_user_quota_details: contains: filesystem: contains: UnityFileSystem: contains: id: description: ID of the filesystem for which the user quota is created. type: str name: description: Name of filesystem. type: str nas_server: contains: id: description: ID of nasserver. type: str name: description: Name of nasserver. type: str description: Nasserver details where filesystem is created. type: dict description: Filesystem details for which the user quota is created. type: dict description: Filesystem details for which the user quota is created. type: dict gp_left: description: The grace period left after the soft limit for the user quota is exceeded. type: int hard_limit: description: Hard limitation for a user on the total space available. If exceeded, user cannot write data. type: int hard_ratio: description: The hard ratio is the ratio between the hard limit size of the user quota and the amount of storage actually consumed. type: str id: description: User quota ID. type: str size_used: description: Size of used space in the filesystem by the user files. type: int soft_limit: description: Soft limitation for a user on the total space available. If exceeded, notification will be sent to user for the grace period mentioned, beyond which user cannot use space. type: int soft_ratio: description: The soft ratio is the ratio between the soft limit size of the user quota and the amount of storage actually consumed. type: str state: description: State of the user quota. type: int tree_quota: contains: UnityTreeQuota: contains: id: description: ID of the quota tree. type: str path: description: Path to quota tree. type: str description: Quota tree details for which the user quota is created. type: dict description: Quota tree details for which the user quota is created. type: dict uid: description: User ID of the user. type: int unix_name: description: Unix user name for this user quota's uid. type: str windows_names: description: Windows user name that maps to this quota's uid. type: str windows_sids: description: Windows SIDs that maps to this quota's uid type: str description: Details of the user quota. returned: When user quota exists sample: existed: true filesystem: UnityFileSystem: hash: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER id: fs_120 name: nfs-multiprotocol nas_server: id: nas_1 name: lglad072 gp_left: null hard_limit: 10.0 GB hard_ratio: null hash: 8752448438089 id: userquota_171798694698_0_60000 size_used: 0 soft_limit: 10.0 GB soft_ratio: null state: 0 tree_quota: null uid: 60000 unix_name: null windows_names: null windows_sids: null type: dict