dellemc.unity.tree_quota module – Manage quota tree 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.tree_quota
.
New in dellemc.unity 1.2.0
Synopsis
Managing Quota tree on the Unity storage system includes Create quota tree, Get quota tree, Modify quota tree and Delete quota tree.
Aliases: dellemc_unity_tree_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:
|
|
Description of a quota tree. |
|
The ID of the filesystem for which the quota tree is created. For creation of a quota tree either filesystem_id or filesystem_name is required. |
|
The name of the filesystem for which quota tree is created. For creation or modification of a quota tree either filesystem_name or filesystem_id is required. |
|
Hard limitation for a quota tree on the total space available. If exceeded, users in quota tree 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 quota tree either filesystem_id or filesystem_name is required. |
|
The name of the NAS server in which the filesystem is created. For creation of a quota tree 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/view/modify/delete 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 quota tree on the total space available. If exceeded, notification will be sent to users in the quota tree for the grace period mentioned, beyond which users cannot use space. Value Both soft_limit and hard_limit cannot be |
|
The state option is used to mention the existence of the filesystem quota tree. Choices:
|
|
The ID of the quota tree. Either tree_quota_id or path to quota tree is required to view/modify/delete quota tree. |
|
IP or FQDN of the Unity management server. |
|
The username of the Unity management server. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
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 quota tree details by quota tree id
dellemc.unity.tree_quota:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
tree_quota_id: "treequota_171798700679_10"
state: "present"
- name: Get quota tree details by quota tree path
dellemc.unity.tree_quota:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_name: "fs_2171"
nas_server_id: "nas_21"
path: "/test"
state: "present"
- name: Create quota tree for a filesystem with filesystem id
dellemc.unity.tree_quota:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "fs_2171"
hard_limit: 6
cap_unit: "TB"
soft_limit: 5
path: "/test_new"
state: "present"
- name: Create quota tree for a filesystem with filesystem name
dellemc.unity.tree_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
path: "/test_new"
state: "present"
- name: Modify quota tree limit usage by quota tree path
dellemc.unity.tree_quota:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
path: "/test_new"
hard_limit: 10
cap_unit: "TB"
soft_limit: 8
state: "present"
- name: Modify quota tree by quota tree id
dellemc.unity.tree_quota:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "fs_2171"
tree_quota_id: "treequota_171798700679_10"
hard_limit: 12
cap_unit: "TB"
soft_limit: 10
state: "present"
- name: Delete quota tree by quota tree id
dellemc.unity.tree_quota:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "fs_2171"
tree_quota_id: "treequota_171798700679_10"
state: "absent"
- name: Delete quota tree by path
dellemc.unity.tree_quota:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
filesystem_id: "fs_2171"
path: "/test_new"
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 quota tree. Returned: When quota tree exists Sample: |
|
Description of the quota tree. Returned: success |
|
Filesystem details for which the quota tree is created. Returned: success |
|
Filesystem details for which the quota tree is created. Returned: success |
|
ID of the filesystem for which the quota tree is create. Returned: success |
|
The grace period left after the soft limit for the user quota is exceeded. Returned: success |
|
Hard limit of quota tree. If the quota tree’s space usage exceeds the hard limit, users in quota tree cannot write data. Returned: success |
|
Quota tree ID. Returned: success |
|
Path to quota tree. A valid path must start with a forward slash ‘/’. It is mandatory while creating a quota tree. Returned: success |
|
Size of used space in the filesystem by the user files. Returned: success |
|
Soft limit of the quota tree. If the quota tree’s space usage exceeds the soft limit, the storage system starts to count down based on the specified grace period. Returned: success |
|
State of the quota tree. Returned: success |