dellemc / dellemc.unity / 1.2.1 / module / dellemc_unity_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> preview | supported by communitydellemc.unity.dellemc_unity_user_quota (1.2.1) — module
Install with ansible-galaxy collection install dellemc.unity:==1.2.1
collections: - name: dellemc.unity version: 1.2.1
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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" user_quota_id: "userquota_171798700679_0_123" state: "present"
- name: Get user quota details by user quota uid/user name dellemc.unity.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" filesystem_id: "fs_2171" win_domain: "prod" user_name: "sample" state: "absent"
- name: Create user quota of a quota tree dellemc.unity.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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.dellemc_unity_user_quota: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" 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 tree_quota_id or 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. required: false type: int state: choices: - absent - present description: - The 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 soft_limit and hard_limit size. - It defaults to '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 user_type is 'Windows' or 'Unix'. - user_name must be specified along with win_domain when user_type is '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 0 implies no limit. - One of the values of soft_limit and hard_limit can be 0, however, both cannot be 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 0 implies no limit. - Both soft_limit and hard_limit cannot be 0 during creation or modification of user quota. type: int verifycert: choices: - true - false default: true description: - Boolean variable to specify whether or not to validate SSL certificate. - True - Indicates that the SSL certificate should be verified. - False - Indicates that the SSL certificate should not be verified. required: false type: bool win_domain: description: - Fully qualified or short domain name for Windows user type. - Mandatory when user_type is '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 filesystem_id or 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 filesystem_id or filesystem_name is required. type: str tree_quota_id: description: - The ID of the quota tree. - Either tree_quota_id or 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 filesystem_name: description: - The name of the filesystem for which the user quota is created. - For creation of a user quota either filesystem_name or 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 nas_server_name or nas_server_id is required. type: str
changed: description: Whether or not the resource has changed. returned: always 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: complex description: Filesystem details for which the user quota is created. type: complex description: Filesystem details for which the user quota is created. type: complex 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: complex description: Quota tree details for which the user quota is created. type: complex 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 type: complex