dellemc.unity.user_quota module – Manage user quota on the Unity storage system
Note
This module is part of the dellemc.unity collection (version 1.7.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install dellemc.unity
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.unity.user_quota
.
New in dellemc.unity 1.2.0
Synopsis
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.
Aliases: dellemc_unity_user_quota
Requirements
The below requirements are needed on the host that executes this module.
A Dell Unity Storage device version 5.1 or later.
Ansible-core 2.13 or later.
Python 3.9, 3.10 or 3.11.
Storops Python SDK 1.2.11.
Parameters
Parameter |
Comments |
---|---|
Unit of soft_limit and hard_limit size. It defaults to Choices:
|
|
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. |
|
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. |
|
Hard limitation for a user on the total space available. If exceeded, user cannot write data. Value One of the values of soft_limit and hard_limit can be |
|
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. |
|
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. |
|
The password of the Unity management server. |
|
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 ‘/’. |
|
Port number through which communication happens with Unity management server. Default: |
|
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 Both soft_limit and hard_limit cannot be |
|
The state option is used to mention the existence of the user quota. Choices:
|
|
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. |
|
User ID of the user quota. |
|
IP or FQDN of the Unity management server. |
|
User name of the user quota when user_type is Option user_name must be specified along with win_domain when user_type is |
|
User quota ID generated after creation of a user quota. |
|
Type of user creating a user quota. Mandatory while creating or modifying user quota. Choices:
|
|
The username of the Unity management server. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
|
Fully qualified or short domain name for Windows user type. Mandatory when user_type is |
Notes
Note
The check_mode is not supported.
The modules present in this collection named as ‘dellemc.unity’ are built to support the Dell Unity storage platform.
Examples
- 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"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Whether or not the resource has changed. Returned: always Sample: |
|
Details of the user quota. Returned: When user quota exists Sample: |
|
Filesystem details for which the user quota is created. Returned: success |
|
Filesystem details for which the user quota is created. Returned: success |
|
ID of the filesystem for which the user quota is created. Returned: success |
|
Name of filesystem. Returned: success |
|
Nasserver details where filesystem is created. Returned: success |
|
ID of nasserver. Returned: success |
|
Name of nasserver. Returned: success |
|
The grace period left after the soft limit for the user quota is exceeded. Returned: success |
|
Hard limitation for a user on the total space available. If exceeded, user cannot write data. Returned: success |
|
The hard ratio is the ratio between the hard limit size of the user quota and the amount of storage actually consumed. Returned: success |
|
User quota ID. Returned: success |
|
Size of used space in the filesystem by the user files. Returned: success |
|
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. Returned: success |
|
The soft ratio is the ratio between the soft limit size of the user quota and the amount of storage actually consumed. Returned: success |
|
State of the user quota. Returned: success |
|
Quota tree details for which the user quota is created. Returned: success |
|
Quota tree details for which the user quota is created. Returned: success |
|
ID of the quota tree. Returned: success |
|
Path to quota tree. Returned: success |
|
User ID of the user. Returned: success |
|
Unix user name for this user quota’s uid. Returned: success |
|
Windows user name that maps to this quota’s uid. Returned: success |
|
Windows SIDs that maps to this quota’s uid Returned: success |