dellemc.unity.user_quota 模块 – 管理 Unity 存储系统上的用户配额
注意
此模块是 dellemc.unity 集合 (版本 2.0.0) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install dellemc.unity
。您需要其他要求才能使用此模块,请参阅 要求 获取详细信息。
要在 playbook 中使用它,请指定:dellemc.unity.user_quota
。
dellemc.unity 1.2.0 中的新增功能
概要
管理 Unity 存储系统上的用户配额包括创建用户配额、获取用户配额、修改用户配额、删除用户配额、为配额树创建用户配额、修改配额树的用户配额和删除配额树的用户配额。
要求
执行此模块的主机需要以下要求。
Dell Unity 存储设备版本 5.1 或更高版本。
Ansible-core 2.14 或更高版本。
Python 3.9、3.10 或 3.11。
Storops Python SDK 1.2.11。
参数
参数 |
注释 |
---|---|
soft_limit 和 hard_limit 大小的单位。 如果未指定,则默认为 选项
|
|
创建用户配额的文件系统的 ID。 创建用户配额时,需要 filesystem_id 或 filesystem_name 之一。 |
|
创建用户配额的文件系统的名称。 创建用户配额时,需要 filesystem_name 或 filesystem_id 之一。 |
|
用户对可用总空间的硬性限制。如果超过此限制,用户将无法写入数据。 值 soft_limit 和 hard_limit 的其中一个值可以为 |
|
创建文件系统的 NAS 服务器的 ID。 创建用户配额时,需要 filesystem_id 或 filesystem_name 之一。 |
|
创建文件系统的 NAS 服务器的名称。 创建用户配额时,需要 nas_server_name 或 nas_server_id 之一。 |
|
Unity 管理服务器的密码。 |
|
配额树的路径。 需要 tree_quota_id 或 path 到配额树才能为配额树创建/修改/删除用户配额。 路径必须以正斜杠“/”开头。 |
|
与 Unity 管理服务器进行通信的端口号。 默认值: |
|
用户对可用总空间的软性限制。如果超过此限制,系统会在规定的宽限期内向用户发送通知,超过宽限期后,用户将无法使用空间。 值 在创建或修改用户配额时,soft_limit 和 hard_limit 都不能为 |
|
state 选项用于指定用户配额的存在。 选项
|
|
配额树的 ID。 需要 tree_quota_id 或 path 到配额树才能为配额树创建/修改/删除用户配额。 |
|
用户配额的用户 ID。 |
|
Unity 管理服务器的 IP 或 FQDN。 |
|
当 user_type 为 当 user_type 为 |
|
创建用户配额后生成的配额 ID。 |
|
创建用户配额的用户类型。 创建或修改用户配额时为必填项。 选项
|
|
Unity 管理服务器的用户名。 |
|
布尔变量,用于指定是否验证 SSL 证书。
选项
|
|
Windows 用户类型的完全限定域名或短域名。 当user_type 为 |
备注
注意
不支持check_mode。
此集合中名为“dellemc.unity”的模块旨在支持 Dell Unity 存储平台。
示例
- 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"
返回值
常用的返回值已在 此处 记录,以下是此模块特有的字段
键 |
描述 |
---|---|
资源是否已更改。 返回:始终 示例: |
|
用户配额的详细信息。 返回:用户配额存在时 示例: |
|
创建用户配额的文件系统详细信息。 返回:成功 |
|
创建用户配额的文件系统详细信息。 返回:成功 |
|
为其创建用户配额的文件系统的 ID。 返回:成功 |
|
文件系统名称。 返回:成功 |
|
创建文件系统的 Nasserver 详细信息。 返回:成功 |
|
Nasserver 的 ID。 返回:成功 |
|
Nasserver 的名称。 返回:成功 |
|
超过用户配额的软限制后剩余的宽限期。 返回:成功 |
|
用户对可用总空间的硬性限制。如果超过此限制,用户将无法写入数据。 返回:成功 |
|
硬比率是用户配额的硬限制大小与实际使用的存储量之间的比率。 返回:成功 |
|
用户配额 ID。 返回:成功 |
|
用户文件在文件系统中使用的空间大小。 返回:成功 |
|
用户在可用总空间上的软限制。如果超过此限制,则会向用户发送关于宽限期的通知,超过宽限期后用户将无法使用空间。 返回:成功 |
|
软比率是用户配额的软限制大小与实际使用的存储量之间的比率。 返回:成功 |
|
用户配额的状态。 返回:成功 |
|
为其创建用户配额的配额树详细信息。 返回:成功 |
|
为其创建用户配额的配额树详细信息。 返回:成功 |
|
配额树的 ID。 返回:成功 |
|
配额树的路径。 返回:成功 |
|
用户的用户 ID。 返回:成功 |
|
此用户配额 uid 的 Unix 用户名。 返回:成功 |
|
映射到此配额 uid 的 Windows 用户名。 返回:成功 |
|
映射到此配额 uid 的 Windows SID。 返回:成功 |