© 2022 Dell Inc. or its subsidiaries. All rights reserved. Dell and other trademarks are trademarks of Dell Inc. or its subsidiaries. Other trademarks may be trademarks of their respective owners.
- NFS Module
- Volume Module
- NAS Server Module
- Quota Tree Module
- File System Module
- Storage Pool Module
- Info Module
- User Quota Module
- Filesystem Snapshot Module
- Snapshot Module
- SMB Share Module
- Host Module
- Consistency Group Module
- Snapshot Schedule Module
Manage NFS export on Unity storage system
Managing NFS export on Unity storage system includes- Create new NFS export, Modify NFS export attributes, Display NFS export details, Delete NFS export
Parameter | Type | Required | Default | Choices | Description | |
---|---|---|---|---|---|---|
nfs_export_name | str | Name of the nfs export. Mandatory for create operation. Specify either nfs_export_name or nfs_export_id(but not both) for any operation. |
||||
nfs_export_id | str | ID of the nfs export. This is a unique ID generated by Unity storage system. |
||||
filesystem_name | str | Name of the filesystem for which NFS export will be created. Either filesystem or snapshot is required for creation of the NFS. If filesystem name is specified, then nas_server is required to uniquely identify the filesystem. If filesystem parameter is provided, then snapshot cannot be specified. |
||||
filesystem_id | str | ID of the filesystem. This is a unique ID generated by Unity storage system. |
||||
snapshot_name | str | Name of the snapshot for which NFS export will be created. Either filesystem or snapshot is required for creation of the NFS export. If snapshot parameter is provided, then filesystem cannot be specified. |
||||
snapshot_id | str | ID of the snapshot. This is a unique ID generated by Unity storage system. |
||||
nas_server_name | str | Name of the NAS server on which filesystem will be hosted. |
||||
nas_server_id | str | ID of the NAS server on which filesystem will be hosted. |
||||
path | str | Local path to export relative to the NAS server root. With NFS, each export of a file_system or file_snap must have a unique local path. Mandatory while creating NFS export. |
||||
description | str | Description of the NFS export. Optional parameter when creating a NFS export. To modify description, pass the new value in description field. To remove description, pass the empty value in description field. |
||||
host_state | str |
|
Define whether the hosts can access the NFS export. Required when adding or removing access of hosts from the export. |
|||
anonymous_uid | int | Specifies the user ID of the anonymous account. If not specified at the time of creation, it will be set to 4294967294. |
||||
anonymous_gid | int | Specifies the group ID of the anonymous account. If not specified at the time of creation, it will be set to 4294967294. |
||||
state | str | True |
|
State variable to determine whether NFS export will exist or not. |
||
default_access | str |
|
Default access level for all hosts that can access the NFS export. For hosts that need different access than the default, they can be configured by adding to the list. If default_access is not mentioned during creation, then NFS export will be created with NO_ACCESS. |
|||
min_security | str |
|
NFS enforced security type for users accessing a NFS export. If not specified at the time of creation, it will be set to SYS. |
|||
no_access_hosts | list elements: dict |
Hosts with no access to the NFS export. List of dictionaries. Each dictionary will have any of the keys from host_name, host_id, and ip_address. |
||||
host_name | str | False | Name of the host. |
|||
host_id | str | False | ID of the host. |
|||
ip_address | str | False | IP address of the host. |
|||
read_only_hosts | list elements: dict |
Hosts with read-only access to the NFS export. List of dictionaries. Each dictionary will have any of the keys from host_name, host_id, and ip_address. |
||||
host_name | str | False | Name of the host. |
|||
host_id | str | False | ID of the host. |
|||
ip_address | str | False | IP address of the host. |
|||
read_only_root_hosts | list elements: dict |
Hosts with read-only for root user access to the NFS export. List of dictionaries. Each dictionary will have any of the keys from host_name, host_id, and ip_address. |
||||
host_name | str | False | Name of the host. |
|||
host_id | str | False | ID of the host. |
|||
ip_address | str | False | IP address of the host. |
|||
read_write_hosts | list elements: dict |
Hosts with read and write access to the NFS export. List of dictionaries. Each dictionary will have any of the keys from host_name, host_id, and ip_address. |
||||
host_name | str | False | Name of the host. |
|||
host_id | str | False | ID of the host. |
|||
ip_address | str | False | IP address of the host. |
|||
read_write_root_hosts | list elements: dict |
Hosts with read and write for root user access to the NFS export. List of dictionaries. Each dictionary will have any of the keys from host_name, host_id, and ip_address. |
||||
host_name | str | False | Name of the host. |
|||
host_id | str | False | ID of the host. |
|||
ip_address | str | False | IP address of the host. |
|||
unispherehost | str | True | IP or FQDN of the Unity management server. |
|||
username | str | True | The username of the Unity management server. |
|||
password | str | True | The password of the Unity management server. |
|||
verifycert | bool | True | 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. |
|||
port | int | 443 | Port number through which communication happens with Unity management server. |
- name: Create nfs export from filesystem
dellemc.unity.nfs:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
nfs_export_name: "ansible_nfs_from_fs"
path: '/'
filesystem_id: "fs_377"
state: "present"
- name: Create nfs export from snapshot
dellemc.unity.nfs:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
nfs_export_name: "ansible_nfs_from_snap"
path: '/'
snapshot_name: "ansible_fs_snap"
state: "present"
- name: Modify nfs export
dellemc.unity.nfs:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
nfs_export_name: "ansible_nfs_from_fs"
nas_server_id: "nas_3"
description: ""
default_access: "READ_ONLY_ROOT"
anonymous_gid: 4294967290
anonymous_uid: 4294967290
state: "present"
- name: Add host in nfs export
dellemc.unity.nfs:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
nfs_export_name: "ansible_nfs_from_fs"
filesystem_id: "fs_377"
no_access_hosts:
- host_id: "Host_1"
read_only_hosts:
- host_id: "Host_2"
read_only_root_hosts:
- host_name: "host_name1"
read_write_hosts:
- host_name: "host_name2"
read_write_root_hosts:
- ip_address: "1.1.1.1"
host_state: "present-in-export"
state: "present"
- name: Remove host in nfs export
dellemc.unity.nfs:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
nfs_export_name: "ansible_nfs_from_fs"
filesystem_id: "fs_377"
no_access_hosts:
- host_id: "Host_1"
read_only_hosts:
- host_id: "Host_2"
read_only_root_hosts:
- host_name: "host_name1"
read_write_hosts:
- host_name: "host_name2"
read_write_root_hosts:
- ip_address: "1.1.1.1"
host_state: "absent-in-export"
state: "present"
- name: Get nfs details
dellemc.unity.nfs:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
nfs_export_id: "NFSShare_291"
state: "present"
- name: Delete nfs export by nfs name
dellemc.unity.nfs:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
nfs_export_name: "ansible_nfs_name"
nas_server_name: "ansible_nas_name"
state: "absent"
Key | Type | Returned | Description | |||||
---|---|---|---|---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |||||
nfs_share_details | complex | When nfs export exists. | Details of the nfs export. | |||||
anonymous_gid | int | success | Group ID of the anonymous account | |||||
anonymous_uid | int | success | User ID of the anonymous account | |||||
default_access | str | success | Default access level for all hosts that can access export | |||||
description | str | success | Description about the nfs export | |||||
export_paths | list | success | Export paths that can be used to mount and access export | |||||
filesystem | complex | success | Details of the filesystem on which nfs export is present | |||||
UnityFileSystem | complex | success | filesystem details | |||||
id | str | success | ID of the filesystem | |||||
name | str | success | Name of the filesystem | |||||
id | str | success | ID of the nfs export | |||||
min_security | str | success | NFS enforced security type for users accessing an export | |||||
name | str | success | Name of the nfs export | |||||
nas_server | complex | success | Details of the nas server | |||||
UnityNasServer | complex | success | NAS server details | |||||
id | str | success | ID of the nas server | |||||
name | str | success | Name of the nas server | |||||
no_access_hosts_string | str | success | Hosts with no access to the nfs export | |||||
read_only_hosts_string | str | success | Hosts with read-only access to the nfs export | |||||
read_only_root_hosts_string | str | success | Hosts with read-only for root user access to the nfs export | |||||
read_write_hosts_string | str | success | Hosts with read and write access to the nfs export | |||||
read_write_root_hosts_string | str | success | Hosts with read and write for root user access to export | |||||
type | str | success | NFS export type. i.e. filesystem or snapshot |
- Vivek Soni (@v-soni11) [email protected]
Manage volume on Unity storage system
Managing volume on Unity storage system includes- Create new volume, Modify volume attributes, Map Volume to host, Unmap volume to host, Display volume details, Delete volume.
Parameter | Type | Required | Default | Choices | Description | |
---|---|---|---|---|---|---|
vol_name | str | The name of the volume. Mandatory only for create operation. |
||||
vol_id | str | The id of the volume. It can be used only for get, modify, map/unmap host, or delete operation. |
||||
pool_name | str | This is the name of the pool where the volume will be created. Either the pool_name or pool_id must be provided to create a new volume. |
||||
pool_id | str | This is the id of the pool where the volume will be created. Either the pool_name or pool_id must be provided to create a new volume. |
||||
size | int | The size of the volume. |
||||
cap_unit | str |
|
The unit of the volume size. It defaults to 'GB', if not specified. |
|||
description | str | Description about the volume. Description can be removed by passing empty string (""). |
||||
snap_schedule | str | Snapshot schedule assigned to the volume. Add/Remove/Modify the snapshot schedule for the volume. |
||||
compression | bool | Boolean variable , specifies whether or not to enable compression. Compression is supported only for thin volumes. |
||||
is_thin | bool | Boolean variable , specifies whether or not it is a thin volume. The value is set as True by default if not specified. |
||||
sp | str |
|
Storage Processor for this volume. |
|||
io_limit_policy | str | IO limit policy associated with this volume. Once it is set, it cannot be removed through ansible module but it can be changed. |
||||
host_name | str | Name of the host to be mapped/unmapped with this volume. Either host_name or host_id can be specified in one task along with mapping_state. |
||||
host_id | str | ID of the host to be mapped/unmapped with this volume. Either host_name or host_id can be specified in one task along with mapping_state. |
||||
hlu | int | Host Lun Unit to be mapped/unmapped with this volume. It is an optional parameter, hlu can be specified along with host_name or host_id and mapping_state. If hlu is not specified, unity will choose it automatically. The maximum value supported is 255. |
||||
mapping_state | str |
|
State of host access for volume. |
|||
new_vol_name | str | New name of the volume for rename operation. |
||||
tiering_policy | str |
|
Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. |
|||
state | str | True |
|
State variable to determine whether volume will exist or not. |
||
hosts | list elements: dict |
Name of hosts for mapping to a volume. |
||||
host_name | str | Name of the host. |
||||
host_id | str | ID of the host. |
||||
hlu | str | Host Lun Unit to be mapped/unmapped with this volume. It is an optional parameter, hlu can be specified along with host_name or host_id and mapping_state. If hlu is not specified, unity will choose it automatically. The maximum value supported is 255. |
||||
unispherehost | str | True | IP or FQDN of the Unity management server. |
|||
username | str | True | The username of the Unity management server. |
|||
password | str | True | The password of the Unity management server. |
|||
verifycert | bool | True | 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. |
|||
port | int | 443 | Port number through which communication happens with Unity management server. |
- name: Create Volume
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
vol_name: "{{vol_name}}"
description: "{{description}}"
pool_name: "{{pool}}"
size: 2
cap_unit: "{{cap_GB}}"
state: "{{state_present}}"
- name: Expand Volume by volume id
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
vol_id: "{{vol_id}}"
size: 5
cap_unit: "{{cap_GB}}"
state: "{{state_present}}"
- name: Modify Volume, map host by host_name
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
vol_name: "{{vol_name}}"
host_name: "{{host_name}}"
hlu: 5
mapping_state: "{{state_mapped}}"
state: "{{state_present}}"
- name: Modify Volume, unmap host mapping by host_name
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
vol_name: "{{vol_name}}"
host_name: "{{host_name}}"
mapping_state: "{{state_unmapped}}"
state: "{{state_present}}"
- name: Map multiple hosts to a Volume
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
vol_id: "{{vol_id}}"
hosts:
- host_name: "10.226.198.248"
hlu: 1
- host_id: "Host_929"
hlu: 2
mapping_state: "mapped"
state: "present"
- name: Modify Volume attributes
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
vol_name: "{{vol_name}}"
new_vol_name: "{{new_vol_name}}"
tiering_policy: "AUTOTIER"
compression: True
state: "{{state_present}}"
- name: Delete Volume by vol name
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
vol_name: "{{vol_name}}"
state: "{{state_absent}}"
- name: Delete Volume by vol id
dellemc.unity.volume:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
vol_id: "{{vol_id}}"
state: "{{state_absent}}"
Key | Type | Returned | Description | |
---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |
volume_details | complex | When volume exists | Details of the volume. | |
current_sp | str | success | Current storage processor for this volume | |
description | str | success | Description about the volume | |
host_access | list | success | Host mapped to this volume | |
id | str | success | The system generated ID given to the volume | |
io_limit_policy | dict | success | IO limit policy associated with this volume | |
is_data_reduction_enabled | bool | success | Whether or not compression enabled on this volume | |
is_thin_enabled | bool | success | Indicates whether thin provisioning is enabled for this volume | |
name | str | success | Name of the volume | |
pool | dict | success | The pool in which this volume is allocated. | |
size_total_with_unit | str | success | Size of the volume with actual unit. | |
snap_schedule | dict | success | Snapshot schedule applied to this volume | |
tiering_policy | str | success | Tiering policy applied to this volume | |
wwn | str | success | The world wide name of this volume |
- Arindam Datta (@arindam-emc) [email protected]
Manage NAS servers on Unity storage system
Managing NAS servers on Unity storage system includes get, modification to the NAS servers.
Parameter | Type | Required | Default | Choices | Description |
---|---|---|---|---|---|
nas_server_id | str | The ID of the NAS server. nas_server_name and nas_server_id are mutually exclusive parameters. Either one is required to perform the task. |
|||
nas_server_name | str | The Name of the NAS server. nas_server_name and nas_server_id are mutually exclusive parameters. Either one is required to perform the task. |
|||
nas_server_new_name | str | The new name of the NAS server. It can be mentioned during modification of the NAS server. |
|||
is_replication_destination | bool | It specifies whether the NAS server is a replication destination. It can be mentioned during modification of the NAS server. |
|||
is_backup_only | bool | It specifies whether the NAS server is used as backup only. It can be mentioned during modification of the NAS server. |
|||
is_multiprotocol_enabled | bool | This parameter indicates whether multiprotocol sharing mode is enabled. It can be mentioned during modification of the NAS server. |
|||
allow_unmapped_user | bool | This flag is used to mandatorily disable access in case of any user mapping failure. If true, then enable access in case of any user mapping failure. If false, then disable access in case of any user mapping failure. It can be mentioned during modification of the NAS server. |
|||
default_windows_user | str | Default windows user name used for granting access in the case of Unix to Windows user mapping failure. It can be mentioned during modification of the NAS server. |
|||
default_unix_user | str | Default Unix user name used for granting access in the case of Windows to Unix user mapping failure. It can be mentioned during modification of the NAS server. |
|||
enable_windows_to_unix_username_mapping | bool | This parameter indicates whether a Unix to/from Windows user name mapping is enabled. It can be mentioned during modification of the NAS server. |
|||
is_packet_reflect_enabled | bool | If the packet has to be reflected, then this parameter has to be set to True. It can be mentioned during modification of the NAS server. |
|||
current_unix_directory_service | str |
|
This is the directory service used for querying identity information for UNIX (such as UIDs, GIDs, net groups). It can be mentioned during modification of the NAS server. |
||
state | str | True |
|
Define the state of NAS server on the array. present indicates that NAS server should exist on the system after the task is executed. Right now deletion of NAS server is not supported. Hence, if state is set to absent for any existing NAS server then error will be thrown. For any non-existing NAS server, if state is set to absent then it will return None. |
|
unispherehost | str | True | IP or FQDN of the Unity management server. |
||
username | str | True | The username of the Unity management server. |
||
password | str | True | The password of the Unity management server. |
||
verifycert | bool | True | 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. |
||
port | int | 443 | Port number through which communication happens with Unity management server. |
- name: Get Details of NAS Server
dellemc.unity.nasserver:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
nas_server_name: "{{nas_server_name}}"
state: "present"
- name: Modify Details of NAS Server
dellemc.unity.nasserver:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
nas_server_name: "{{nas_server_name}}"
nas_server_new_name: "updated_sample_nas_server"
is_replication_destination: False
is_backup_only: False
is_multiprotocol_enabled: True
allow_unmapped_user: True
default_unix_user: "default_unix_sample_user"
default_windows_user: "default_windows_sample_user"
enable_windows_to_unix_username_mapping: True
current_unix_directory_service: "LDAP"
is_packet_reflect_enabled: True
state: "present"
Key | Type | Returned | Description | |
---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |
nas_server_details | complex | When NAS server exists. | The NAS server details. | |
allow_unmapped_user | bool | success | enable/disable access status in case of any user mapping failure | |
current_unix_directory_service | str | success | Directory service used for querying identity information for UNIX (such as UIDs, GIDs, net groups). | |
default_unix_user | str | success | Default Unix user name used for granting access in the case of Windows to Unix user mapping failure. | |
default_windows_user | str | success | Default windows user name used for granting access in the case of Unix to Windows user mapping failure | |
id | str | success | ID of the NAS server | |
is_backup_only | bool | success | Whether the NAS server is used as backup only. | |
is_multi_protocol_enabled | bool | success | Indicates whether multiprotocol sharing mode is enabled | |
is_packet_reflect_enabled | bool | success | If the packet reflect has to be enabled | |
is_replication_destination | bool | success | If the NAS server is a replication destination then True. | |
is_windows_to_unix_username_mapping_enabled | bool | success | Indicates whether a Unix to/from Windows user name mapping is enabled. | |
name | str | success | Name of the NAS server |
- P Srinivas Rao (@srinivas-rao5) [email protected]
Manage quota tree on the Unity storage system
Managing Quota tree on the Unity storage system includes Create quota tree, Get quota tree, Modify quota tree and Delete quota tree.
Parameter | Type | Required | Default | Choices | Description |
---|---|---|---|---|---|
filesystem_name | str | 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. |
|||
filesystem_id | str | 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. |
|||
nas_server_name | str | 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. |
|||
nas_server_id | str | 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. |
|||
tree_quota_id | str | The ID of the quota tree. Either tree_quota_id or path to quota tree is required to view/modify/delete quota tree. |
|||
path | str | 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 '/'. |
|||
hard_limit | int | Hard limitation for a quota tree on the total space available. If exceeded, users in quota tree 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 both 0 during creation of a quota tree. |
|||
soft_limit | int | 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 0 implies no limit. Both soft_limit and hard_limit cannot be 0 during creation of quota tree. |
|||
cap_unit | str |
|
Unit of soft_limit and hard_limit size. It defaults to 'GB' if not specified. |
||
description | str | Description of a quota tree. |
|||
state | str | True |
|
The state option is used to mention the existence of the filesystem quota tree. |
|
unispherehost | str | True | IP or FQDN of the Unity management server. |
||
username | str | True | The username of the Unity management server. |
||
password | str | True | The password of the Unity management server. |
||
verifycert | bool | True | 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. |
||
port | int | 443 | Port number through which communication happens with Unity management server. |
- name: Get quota tree details by quota tree id
dellemc.unity.tree_quota:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
quota_tree_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}}"
verifycert: "{{verifycert}}"
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}}"
verifycert: "{{verifycert}}"
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}}"
verifycert: "{{verifycert}}"
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}}"
verifycert: "{{verifycert}}"
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}}"
verifycert: "{{verifycert}}"
filesystem_id: "fs_2171"
quota_tree_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}}"
verifycert: "{{verifycert}}"
filesystem_id: "fs_2171"
quota_tree_id: "treequota_171798700679_10"
state: "absent"
- name: Delete quota tree by path
dellemc.unity.tree_quota:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
filesystem_id: "fs_2171"
path: "/test_new"
state: "absent"
Key | Type | Returned | Description | |||
---|---|---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |||
get_quota_tree_details | complex | When quota tree exists | Details of the quota tree. | |||
description | str | success | Description of the quota tree. | |||
filesystem | complex | success | Filesystem details for which the quota tree is created. | |||
UnityFileSystem | complex | success | Filesystem details for which the quota tree is created. | |||
id | str | success | ID of the filesystem for which the quota tree is create. | |||
gp_left | int | success | The grace period left after the soft limit for the user quota is exceeded. | |||
hard_limit | int | success | Hard limit of quota tree. If the quota tree's space usage exceeds the hard limit, users in quota tree cannot write data. | |||
id | str | success | Quota tree ID. | |||
path | str | success | Path to quota tree. A valid path must start with a forward slash '/'. It is mandatory while creating a quota tree. | |||
size_used | int | success | Size of used space in the filesystem by the user files. | |||
soft_limit | int | 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. | |||
state | int | success | State of the quota tree. |
- Spandita Panigrahi (@panigs7) [email protected]
Manage filesystem on Unity storage system
Managing filesystem on Unity storage system includes- Create new filesystem, Modify snapschedule attribute of filesystem Modify filesystem attributes, Display filesystem details, Display filesystem snapshots, Display filesystem snapschedule, Delete snapschedule associated with the filesystem, Delete filesystem, Create new filesystem with quota configuration
Parameter | Type | Required | Default | Choices | Description | |
---|---|---|---|---|---|---|
filesystem_name | str | The name of the filesystem. Mandatory only for the create operation. All the operations are supported through 'filesystem_name'. It is mutually exclusive with 'filesystem_id'. |
||||
filesystem_id | str | The id of the filesystem.It is mutually exclusive with 'filesystem_name'. It can be used only for get, modify, or delete operations. |
||||
pool_name | str | This is the name of the pool where the filesystem will be created. Either the pool_name or pool_id must be provided to create a new filesystem. |
||||
pool_id | str | This is the ID of the pool where the filesystem will be created. Either the pool_name or pool_id must be provided to create a new filesystem. |
||||
size | int | The size of the filesystem. |
||||
cap_unit | str |
|
The unit of the filesystem size. It defaults to 'GB', if not specified. |
|||
nas_server_name | str | Name of the NAS server on which filesystem will be hosted. |
||||
nas_server_id | str | ID of the NAS server on which filesystem will be hosted. |
||||
supported_protocols | str |
|
Protocols supported by the file system. It will be overridden by NAS server configuration if NAS Server is Multiprotocol. |
|||
description | str | Description about the filesystem. Description can be removed by passing empty string (""). |
||||
smb_properties | dict | Advance settings for SMB. It contains optional candidate variables. |
||||
is_smb_sync_writes_enabled | bool | Indicates whether the synchronous writes option is enabled on the file system. |
||||
is_smb_notify_on_access_enabled | bool | Indicates whether notifications of changes to directory file structure are enabled. |
||||
is_smb_op_locks_enabled | bool | Indicates whether opportunistic file locking is enabled on the file system. |
||||
is_smb_notify_on_write_enabled | bool | Indicates whether file write notifications are enabled on the file system. |
||||
smb_notify_on_change_dir_depth | int | Integer variable, determines the lowest directory level to which the enabled notifications apply. Minimum value is 1. |
||||
data_reduction | bool | Boolean variable, specifies whether or not to enable compression. Compression is supported only for thin filesystem. |
||||
is_thin | bool | Boolean variable, specifies whether or not it is a thin filesystem. |
||||
access_policy | str |
|
Access policy of a filesystem. |
|||
locking_policy | str |
|
File system locking policies. These policy choices control whether the NFSv4 range locks must be honored. |
|||
tiering_policy | str |
|
Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. |
|||
quota_config | dict | Configuration for quota management. It contains optional parameters. |
||||
grace_period | int | Grace period set in quota configuration after soft limit is reached. If grace_period is not set during creation of filesystem, it will be set to '7 days' by default. |
||||
grace_period_unit | str |
|
Unit of grace period. Default unit is 'days'. |
|||
default_hard_limit | int | Default hard limit for user quotas and tree quotas. If default_hard_limit is not set while creation of filesystem, it will be set to 0B by default. |
||||
default_soft_limit | int | Default soft limit for user quotas and tree quotas. If default_soft_limit is not set while creation of filesystem, it will be set to 0B by default. |
||||
is_user_quota_enabled | bool | Indicates whether the user quota is enabled. Parameters 'is_user_quota_enabled' and 'quota_policy' are mutually exclusive. If is_user_quota_enabled is not set while creation of filesystem, it will be set to false by default. |
||||
quota_policy | str |
|
Quota policy set in quota configuration. Parameters 'is_user_quota_enabled' and 'quota_policy' are mutually exclusive. If quota_policy is not set while creation of filesystem, it will be set to "FILE_SIZE" by default. |
|||
cap_unit | str |
|
Unit of default_soft_limit and default_hard_limit size. Default unit is 'GB'. |
|||
state | str | True |
|
State variable to determine whether filesystem will exist or not. |
||
snap_schedule_name | str | This is the name of an existing snapshot schedule which is to be associated with the filesystem. This is mutually exclusive with snapshot schedule id. |
||||
snap_schedule_id | str | This is the id of an existing snapshot schedule which is to be associated with the filesystem. This is mutually exclusive with snapshot schedule name. filesystem. |
||||
unispherehost | str | True | IP or FQDN of the Unity management server. |
|||
username | str | True | The username of the Unity management server. |
|||
password | str | True | The password of the Unity management server. |
|||
verifycert | bool | True | 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. |
|||
port | int | 443 | Port number through which communication happens with Unity management server. |
- SMB shares, NFS exports, and snapshots associated with filesystem need to be deleted prior to deleting a filesystem.
- quota_config parameter can be used to update default hard limit and soft limit values to limit the maximum space that can be used. By default they both are set to 0 during filesystem creation which means unlimited.
- name: Create FileSystem
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
filesystem_name: "ansible_test_fs"
nas_server_name: "lglap761"
pool_name: "pool_1"
size: 5
state: "present"
- name: Create FileSystem with quota configuration
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
filesystem_name: "ansible_test_fs"
nas_server_name: "lglap761"
pool_name: "pool_1"
size: 5
quota_config:
grace_period: 8
grace_period_unit: "days"
default_soft_limit: 10
is_user_quota_enabled: False
state: "present"
- name: Expand FileSystem size
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
filesystem_name: "ansible_test_fs"
nas_server_name: "lglap761"
size: 10
state: "present"
- name: Expand FileSystem size
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
filesystem_name: "ansible_test_fs"
nas_server_name: "lglap761"
size: 10
state: "present"
- name: Modify FileSystem smb_properties
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
filesystem_name: "ansible_test_fs"
nas_server_name: "lglap761"
smb_properties:
is_smb_op_locks_enabled: True
smb_notify_on_change_dir_depth: 5
is_smb_notify_on_access_enabled: True
state: "present"
- name: Modify FileSystem Snap Schedule
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
filesystem_id: "fs_141"
snap_schedule_id: "{{snap_schedule_id}}"
state: "{{state_present}}"
- name: Get details of FileSystem using id
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
filesystem_id: "rs_405"
state: "present"
- name: Delete a FileSystem using id
dellemc.unity.filesystem:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
filesystem_id: "rs_405"
state: "absent"
Key | Type | Returned | Description | |
---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |
filesystem_snapshot_details | complex | When filesystem snapshot exists | Details of the filesystem snapshot. | |
access_type | str | success | Access type of filesystem snapshot. | |
attached_wwn | str | success | Attached WWN details. | |
creation_time | str | success | Creation time of filesystem snapshot. | |
creator_schedule | str | success | Creator schedule of filesystem snapshot. | |
creator_type | str | success | Creator type for filesystem snapshot. | |
creator_user | str | success | Creator user for filesystem snapshot. | |
description | str | success | Description of the filesystem snapshot. | |
expiration_time | str | success | Date and time after which the filesystem snapshot will expire. | |
filesystem_id | str | success | Id of the filesystem for which the snapshot exists. | |
filesystem_name | str | success | Name of the filesystem for which the snapshot exists. | |
id | str | success | Unique identifier of the filesystem snapshot instance. | |
is_auto_delete | bool | success | Is the filesystem snapshot is auto deleted or not. | |
name | str | success | The name of the filesystem snapshot. | |
nas_server_id | str | success | Id of the NAS server on which filesystem exists. | |
nas_server_name | str | success | Name of the NAS server on which filesystem exists. | |
size | int | success | Size of the filesystem snapshot. |
- Arindam Datta (@dattaarindam) [email protected]
- Meenakshi Dembi (@dembim) [email protected]
- Spandita Panigrahi (@panigs7) [email protected]
Manage storage pool on Unity
Managing storage pool on Unity storage system contains the operations:
- Get details of storage pool
- Create a storage pool
- Modify storage pool.
Parameter | Type | Required | Default | Choices | Description | |
---|---|---|---|---|---|---|
pool_name | str | Name of the storage pool, unique in the storage system. |
||||
pool_id | str | Unique identifier of the pool instance. |
||||
new_pool_name | str | New name of the storage pool, unique in the storage system. |
||||
pool_description | str | The description of the storage pool. |
||||
fast_cache | str |
|
Indicates whether the fast cache is enabled for the storage pool. enabled - FAST Cache is enabled for the pool. disabled - FAST Cache is disabled for the pool. |
|||
fast_vp | str |
|
Indicates whether to enable scheduled data relocations for the pool. enabled - Enabled scheduled data relocations for the pool. disabled - Disabled scheduled data relocations for the pool. |
|||
raid_groups | dict | Parameters to create RAID group from the disks and add it to the pool. |
||||
disk_group_id | str | Id of the disk group |
||||
disk_num | int | Number of disks |
||||
raid_type | str |
|
RAID group types or RAID levels |
|||
stripe_width | str |
|
RAID group stripe widths, including parity or mirror disks |
|||
alert_threshold | int | Threshold at which the system will generate alerts about the free space in the pool, specified as a percentage minimum threshold limit is 50 maximum threshold limit is 84 |
||||
is_harvest_enabled | bool | Enable/Disable automatic deletion of snapshots based on pool space usage. |
||||
pool_harvest_high_threshold | float | Max threshold for space used in pool beyond which the system automatically starts deleting snapshots in the pool. applies when the automatic deletion of snapshots based on pool space usage is enabled for the system and pool. minimum pool harvest high threshold value is 1 maximum pool harvest high threshold value is 99 |
||||
pool_harvest_low_threshold | float | Min threshold for space used in pool below which the system automatically stops deletion of snapshots in the pool. applies when the automatic deletion of snapshots based on pool space usage is enabled for the system and pool. minimum pool harvest low threshold value is 0 maximum pool harvest low threshold value is 98 |
||||
is_snap_harvest_enabled | bool | Enable/Disable automatic deletion of snapshots based on pool space usage. |
||||
snap_harvest_high_threshold | float | Max threshold for space used in snapshot beyond which the system automatically starts deleting snapshots in the pool. applies when the automatic deletion of snapshots based on pool space usage is enabled for the pool. minimum snap harvest high threshold value is 1 maximum snap harvest high threshold value is 99 |
||||
snap_harvest_low_threshold | float | Min threshold for space used in snapshot below which the system will stop automatically deleting snapshots in the pool. applies when the automatic deletion of snapshots based on pool space usage is enabled for the pool. minimum snap harvest low threshold value is 0 maximum snap harvest low threshold value is 98 |
||||
pool_type | str |
|
Indicates storage pool type. |
|||
state | str | True |
|
Define whether the storage pool should exist or not. present - indicates that the storage pool should exist on the system. absent - indicates that the storage pool should not exist on the system. |
||
unispherehost | str | True | IP or FQDN of the Unity management server. |
|||
username | str | True | The username of the Unity management server. |
|||
password | str | True | The password of the Unity management server. |
|||
verifycert | bool | True | 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. |
|||
port | int | 443 | Port number through which communication happens with Unity management server. |
- Deletion of storage pool is not allowed through Ansible module.
- name: Get Storage pool details using pool_name
dellemc.unity.storagepool:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
pool_name: "{{pool_name}}"
state: "present"
- name: Get Storage pool details using pool_id
dellemc.unity.storagepool:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
pool_id: "{{pool_id}}"
state: "present"
- name: Modify Storage pool attributes using pool_name
dellemc.unity.storagepool:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
pool_name: "{{pool_name}}"
new_pool_name: "{{new_pool_name}}"
pool_description: "{{pool_description}}"
fast_cache: "{{fast_cache_enabled}}"
fast_vp: "{{fast_vp_enabled}}"
state: "present"
- name: Modify Storage pool attributes using pool_id
dellemc.unity.storagepool:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
pool_id: "{{pool_id}}"
new_pool_name: "{{new_pool_name}}"
pool_description: "{{pool_description}}"
fast_cache: "{{fast_cache_enabled}}"
fast_vp: "{{fast_vp_enabled}}"
state: "present"
- name: Create a StoragePool
dellemc.unity.storagepool:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
pool_name: "Test"
pool_description: "test pool"
raid_groups:
disk_group_id : "dg_16"
disk_num : 2
raid_type : "RAID10"
stripe_width : "BEST_FIT"
alert_threshold : 50
is_harvest_enabled : True
pool_harvest_high_threshold : 60
pool_harvest_low_threshold : 40
is_snap_harvest_enabled : True
snap_harvest_high_threshold : 70
snap_harvest_low_threshold : 50
fast_vp: "enabled"
fast_cache: "enabled"
pool_type : "DYNAMIC"
state: "present"
Key | Type | Returned | Description | ||
---|---|---|---|---|---|
changed | bool | always | Whether or not the storage pool has changed. | ||
storage_pool_details | complex | When storage pool exists. | The storage pool details. | ||
drives | complex | success | Indicates information about the drives associated with the storage pool. | ||
disk_technology | str | success | Indicates disk technology of the drive. | ||
id | str | success | Unique identifier of the drive. | ||
name | str | success | Indicates name of the drive. | ||
size | str | success | Indicates size of the drive. | ||
tier_type | str | success | Indicates tier type of the drive. | ||
id | str | success | Pool id, unique identifier of the pool. | ||
is_fast_cache_enabled | bool | success | Indicates whether the fast cache is enabled for the storage pool. true - FAST Cache is enabled for the pool. false - FAST Cache is disabled for the pool. | ||
is_fast_vp_enabled | bool | success | Indicates whether to enable scheduled data relocations for the storage pool. true - Enabled scheduled data relocations for the pool. false - Disabled scheduled data relocations for the pool. | ||
name | str | success | Pool name, unique in the storage system. | ||
size_free_with_unit | str | success | Indicates size_free with its appropriate unit in human readable form. | ||
size_subscribed_with_unit | str | success | Indicates size_subscribed with its appropriate unit in human readable form. | ||
size_total_with_unit | str | success | Indicates size_total with its appropriate unit in human readable form. | ||
size_used_with_unit | str | success | Indicates size_used with its appropriate unit in human readable form. | ||
snap_size_subscribed_with_unit | str | success | Indicates snap_size_subscribed with its appropriate unit in human readable form. | ||
snap_size_used_with_unit | str | success | Indicates snap_size_used with its appropriate unit in human readable form. |
- Ambuj Dubey (@AmbujDube) [email protected]
Gathering information about Dell EMC Unity
Gathering information about Dell EMC Unity storage system includes Get the details of Unity array, Get list of Hosts in Unity array, Get list of FC initiators in Unity array, Get list of iSCSI initiators in Unity array, Get list of Consistency groups in Unity array, Get list of Storage pools in Unity array, Get list of Volumes in Unity array, Get list of Snapshot schedules in Unity array, Get list of NAS servers in Unity array, Get list of File systems in Unity array, Get list of Snapshots in Unity array, Get list of SMB shares in Unity array, Get list of NFS exports in Unity array, Get list of User quotas in Unity array, Get list of Quota tree in Unity array.
Parameter | Type | Required | Default | Choices | Description |
---|---|---|---|---|---|
gather_subset | list elements: str |
|
List of string variables to specify the Unity storage system entities for which information is required. host fc_initiator iscsi_initiator cg storage_pool vol snapshot_schedule nas_server file_system snapshot nfs_export smb_share user_quota tree_quota disk_group |
||
unispherehost | str | True | IP or FQDN of the Unity management server. |
||
username | str | True | The username of the Unity management server. |
||
password | str | True | The password of the Unity management server. |
||
verifycert | bool | True | 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. |
||
port | int | 443 | Port number through which communication happens with Unity management server. |
- name: Get detailed list of Unity entities
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- host
- fc_initiator
- iscsi_initiator
- cg
- storage_pool
- vol
- snapshot_schedule
- nas_server
- file_system
- snapshot
- nfs_export
- smb_share
- user_quota
- tree_quota
- disk_group
- name: Get information of Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
- name: Get list of hosts on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- host
- name: Get list of FC initiators on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- fc_initiator
- name: Get list of ISCSI initiators on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- iscsi_initiator
- name: Get list of consistency groups on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- cg
- name: Get list of storage pools on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- storage_pool
- name: Get list of volumes on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- vol
- name: Get list of snapshot schedules on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- snapshot_schedule
- name: Get list of NAS Servers on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- nas_server
- name: Get list of File Systems on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- file_system
- name: Get list of Snapshots on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- snapshot
- name: Get list of NFS exports on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- nfs_export
- name: Get list of SMB shares on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- smb_share
- name: Get list of user quotas on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- user_quota
- name: Get list of quota trees on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- tree_quota
- name: Get list of disk groups on Unity array
dellemc.unity.info:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
gather_subset:
- disk_group
Key | Type | Returned | Description | |
---|---|---|---|---|
Array_Details | complex | always | Details of the Unity Array. | |
api_version | str | success | The current api version of the Unity Array. | |
earliest_api_version | str | success | The earliest api version of the Unity Array. | |
model | str | success | The model of the Unity Array. | |
name | str | success | The name of the Unity Array. | |
software_version | str | success | The software version of the Unity Array. | |
Consistency_Groups | complex | When Consistency Groups exist. | Details of the Consistency Groups. | |
id | str | success | The ID of the Consistency Group. | |
name | str | success | The name of the Consistency Group. | |
Disk_Groups | complex | When disk groups exist. | Details of the disk groups. | |
id | str | success | The ID of the disk group. | |
name | str | success | The name of the disk group. | |
tier_type | str | success | The tier type of the disk group. | |
FC_initiators | complex | When FC initiator exist. | Details of the FC initiators. | |
WWN | str | success | The WWN of the FC initiator. | |
id | str | success | The id of the FC initiator. | |
File_Systems | complex | When File Systems exist. | Details of the File Systems. | |
id | str | success | The ID of the File System. | |
name | str | success | The name of the File System. | |
Hosts | complex | When hosts exist. | Details of the hosts. | |
id | str | success | The ID of the host. | |
name | str | success | The name of the host. | |
ISCSI_initiators | complex | When ISCSI initiators exist. | Details of the ISCSI initiators. | |
IQN | str | success | The IQN of the ISCSI initiator. | |
id | str | success | The id of the ISCSI initiator. | |
NAS_Servers | complex | When NAS Servers exist. | Details of the NAS Servers. | |
id | str | success | The ID of the NAS Server. | |
name | str | success | The name of the NAS Server. | |
NFS_Exports | complex | When NFS Exports exist. | Details of the NFS Exports. | |
id | str | success | The ID of the NFS Export. | |
name | str | success | The name of the NFS Export. | |
SMB_Shares | complex | When SMB Shares exist. | Details of the SMB Shares. | |
id | str | success | The ID of the SMB Share. | |
name | str | success | The name of the SMB Share. | |
Snapshot_Schedules | complex | When Snapshot Schedules exist. | Details of the Snapshot Schedules. | |
id | str | success | The ID of the Snapshot Schedule. | |
name | str | success | The name of the Snapshot Schedule. | |
Snapshots | complex | When Snapshots exist. | Details of the Snapshots. | |
id | str | success | The ID of the Snapshot. | |
name | str | success | The name of the Snapshot. | |
Storage_Pools | complex | When Storage Pools exist. | Details of the Storage Pools. | |
id | str | success | The ID of the Storage Pool. | |
name | str | success | The name of the Storage Pool. | |
Tree_Quotas | complex | When quota trees exist. | Details of the quota trees. | |
id | str | success | The ID of the quota tree. | |
path | str | success | The path of the quota tree. | |
User_Quotas | complex | When user quotas exist. | Details of the user quotas. | |
id | str | success | The ID of the user quota. | |
uid | str | success | The UID of the user quota. | |
Volumes | complex | When Volumes exist. | Details of the Volumes. | |
id | str | success | The ID of the Volume. | |
name | str | success | The name of the Volume. |
- Rajshree Khare (@kharer5) [email protected]
- Akash Shendge (@shenda1) [email protected]
Manage user quota on the Unity storage system
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.
Parameter | Type | Required | Default | Choices | Description |
---|---|---|---|---|---|
filesystem_name | str | 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. |
|||
filesystem_id | str | 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. |
|||
nas_server_name | str | 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. |
|||
nas_server_id | str | 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. |
|||
hard_limit | int | 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. |
|||
soft_limit | int | 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. |
|||
cap_unit | str |
|
Unit of soft_limit and hard_limit size. It defaults to 'GB' if not specified. |
||
user_type | str |
|
Type of user creating a user quota. Mandatory while creating or modifying user quota. |
||
win_domain | str | Fully qualified or short domain name for Windows user type. Mandatory when user_type is 'Windows'. |
|||
user_name | str | 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'. |
|||
uid | str | User ID of the user quota. |
|||
user_quota_id | str | User quota ID generated after creation of a user quota. |
|||
tree_quota_id | str | 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. |
|||
path | str | 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 '/'. |
|||
state | str | True |
|
The state option is used to mention the existence of the user quota. |
|
unispherehost | str | True | IP or FQDN of the Unity management server. |
||
username | str | True | The username of the Unity management server. |
||
password | str | True | The password of the Unity management server. |
||
verifycert | bool | True | 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. |
||
port | int | 443 | Port number through which communication happens with Unity management server. |
- name: Get user quota details by user quota id
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.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.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.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.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.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.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.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.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.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.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.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.user_quota:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
tree_quota_id: "treequota_171798700679_4"
win_domain: "prod"
user_name: "sample"
state: "absent"
Key | Type | Returned | Description | |||||
---|---|---|---|---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |||||
get_user_quota_details | complex | When user quota exists | Details of the user quota. | |||||
filesystem | complex | success | Filesystem details for which the user quota is created. | |||||
UnityFileSystem | complex | success | Filesystem details for which the user quota is created. | |||||
id | str | success | ID of the filesystem for which the user quota is created. | |||||
name | str | success | Name of filesystem. | |||||
nas_server | complex | success | Nasserver details where filesystem is created. | |||||
gp_left | int | success | The grace period left after the soft limit for the user quota is exceeded. | |||||
hard_limit | int | success | Hard limitation for a user on the total space available. If exceeded, user cannot write data. | |||||
hard_ratio | str | success | The hard ratio is the ratio between the hard limit size of the user quota and the amount of storage actually consumed. | |||||
id | str | success | User quota ID. | |||||
size_used | int | success | Size of used space in the filesystem by the user files. | |||||
soft_limit | int | 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. | |||||
soft_ratio | str | success | The soft ratio is the ratio between the soft limit size of the user quota and the amount of storage actually consumed. | |||||
state | int | success | State of the user quota. | |||||
tree_quota | complex | success | Quota tree details for which the user quota is created. | |||||
UnityTreeQuota | complex | success | Quota tree details for which the user quota is created. | |||||
id | str | success | ID of the quota tree. | |||||
path | str | success | Path to quota tree | |||||
uid | int | success | User ID of the user. | |||||
unix_name | str | success | Unix user name for this user quota's uid. | |||||
windows_names | str | success | Windows user name that maps to this quota's uid. | |||||
windows_sids | str | success | Windows SIDs that maps to this quota's uid |
- Spandita Panigrahi (@panigs7) [email protected]
Manage filesystem snapshot on the Unity storage system
Managing Filesystem Snapshot on the Unity storage system includes create filesystem snapshot, get filesystem snapshot, modify filesystem snapshot and delete filesystem snapshot.
Parameter | Type | Required | Default | Choices | Description |
---|---|---|---|---|---|
snapshot_name | str | The name of the filesystem snapshot. Mandatory parameter for creating a filesystem snapshot. For all other operations either snapshot_name or snapshot_id is required. |
|||
snapshot_id | str | During creation snapshot_id is auto generated. For all other operations either snapshot_id or snapshot_name is required. |
|||
filesystem_name | str | The name of the Filesystem for which snapshot is created. For creation of filesystem snapshot either filesystem_name or filesystem_id is required. Not required for other operations. |
|||
filesystem_id | str | The ID of the Filesystem for which snapshot is created. For creation of filesystem snapshot either filesystem_id or filesystem_name is required. Not required for other operations. |
|||
nas_server_name | str | The name of the NAS server in which the Filesystem is created. For creation of filesystem snapshot either nas_server_name or nas_server_id is required. Not required for other operations. |
|||
nas_server_id | str | The ID of the NAS server in which the Filesystem is created. For creation of filesystem snapshot either filesystem_id or filesystem_name is required. Not required for other operations. |
|||
auto_delete | bool | This option specifies whether or not the filesystem snapshot will be automatically deleted. If set to true, the filesystem snapshot will expire based on the pool auto deletion policy. If set to false, the filesystem snapshot will not be auto deleted based on the pool auto deletion policy. auto_delete can not be set to True, if expiry_time is specified. If during creation neither auto_delete nor expiry_time is mentioned then the filesystem snapshot will be created keeping auto_delete as True. Once the expiry_time is set, then the filesystem snapshot cannot be assigned to the auto delete policy. |
|||
expiry_time | str | This option is for specifying the date and time after which the filesystem snapshot will expire. The time is to be mentioned in UTC timezone. The format is "MM/DD/YYYY HH:MM". Year must be in 4 digits. |
|||
description | str | The additional information about the filesystem snapshot can be provided using this option. The description can be removed by passing an empty string. |
|||
fs_access_type | str |
|
Access type of the filesystem snapshot. Required only during creation of filesystem snapshot. If not given, snapshot's access type will be 'Checkpoint'. |
||
state | str | True |
|
The state option is used to mention the existence of the filesystem snapshot. |
|
unispherehost | str | True | IP or FQDN of the Unity management server. |
||
username | str | True | The username of the Unity management server. |
||
password | str | True | The password of the Unity management server. |
||
verifycert | bool | True | 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. |
||
port | int | 443 | Port number through which communication happens with Unity management server. |
- Filesystem snapshot cannot be deleted, if it has nfs or smb share.
- name: Create Filesystem Snapshot
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
snapshot_name: "ansible_test_FS_snap"
filesystem_name: "ansible_test_FS"
nas_server_name: "lglad069"
description: "Created using playbook"
auto_delete: True
fs_access_type: "Protocol"
state: "present"
- name: Create Filesystem Snapshot with expiry time
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
snapshot_name: "ansible_test_FS_snap_1"
filesystem_name: "ansible_test_FS_1"
nas_server_name: "lglad069"
description: "Created using playbook"
expiry_time: "04/15/2021 2:30"
fs_access_type: "Protocol"
state: "present"
- name: Get Filesystem Snapshot Details using Name
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
snapshot_name: "ansible_test_FS_snap"
state: "present"
- name: Get Filesystem Snapshot Details using ID
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
snapshot_id: "10008000403"
state: "present"
- name: Update Filesystem Snapshot attributes
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
snapshot_name: "ansible_test_FS_snap"
description: "Description updated"
auto_delete: False
expiry_time: "04/15/2021 5:30"
state: "present"
- name: Update Filesystem Snapshot attributes using ID
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
snapshot_id: "10008000403"
expiry_time: "04/18/2021 8:30"
state: "present"
- name: Delete Filesystem Snapshot using Name
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
snapshot_name: "ansible_test_FS_snap"
state: "absent"
- name: Delete Filesystem Snapshot using ID
dellemc.unity.filesystem_snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
snapshot_id: "10008000403"
state: "absent"
Key | Type | Returned | Description | |
---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |
filesystem_snapshot_details | complex | When filesystem snapshot exists | Details of the filesystem snapshot. | |
access_type | str | success | Access type of filesystem snapshot. | |
attached_wwn | str | success | Attached WWN details. | |
creation_time | str | success | Creation time of filesystem snapshot. | |
creator_schedule | str | success | Creator schedule of filesystem snapshot. | |
creator_type | str | success | Creator type for filesystem snapshot. | |
creator_user | str | success | Creator user for filesystem snapshot. | |
description | str | success | Description of the filesystem snapshot. | |
expiration_time | str | success | Date and time after which the filesystem snapshot will expire. | |
filesystem_id | str | success | Id of the filesystem for which the snapshot exists. | |
filesystem_name | str | success | Name of the filesystem for which the snapshot exists. | |
id | str | success | Unique identifier of the filesystem snapshot instance. | |
is_auto_delete | bool | success | Is the filesystem snapshot is auto deleted or not. | |
name | str | success | The name of the filesystem snapshot. | |
nas_server_id | str | success | Id of the NAS server on which filesystem exists. | |
nas_server_name | str | success | Name of the NAS server on which filesystem exists. | |
size | int | success | Size of the filesystem snapshot. |
- Rajshree Khare (@kharer5) [email protected]
Manage snapshots on the Unity storage system
Managing snapshots on the Unity storage system includes create snapshot, delete snapshot, update snapshot, get snapshot, map host and unmap host.
Parameter | Type | Required | Default | Choices | Description |
---|---|---|---|---|---|
snapshot_name | str | The name of the snapshot. Mandatory parameter for creating a snapshot. For all other operations either snapshot name or snapshot id is required. |
|||
vol_name | str | The name of the volume for which snapshot is created. For creation of a snapshot either vol_name or cg_name is required. Not required for other operations. |
|||
cg_name | str | The name of the Consistency Group for which snapshot is created. For creation of a snapshot either vol_name or cg_name is required. Not required for other operations. |
|||
snapshot_id | str | The id of the snapshot. For all operations other than creation either snapshot name or snapshot id is required. |
|||
auto_delete | bool | This option specifies whether the snapshot is auto deleted or not. If set to true, snapshot will expire based on the pool auto deletion policy. If set to false, snapshot will not be auto deleted based on the pool auto deletion policy. auto_delete can not be set to True, if expiry_time is specified. If during creation neither auto_delete nor expiry_time is mentioned then snapshot will be created keeping auto_delete as True. Once the expiry_time is set then snapshot cannot be assigned to the auto delete policy. |
|||
expiry_time | str | This option is for specifying the date and time after which the snapshot will expire. The time is to be mentioned in UTC timezone. The format is "MM/DD/YYYY HH:MM". Year must be in 4 digits. |
|||
description | str | The additional information about the snapshot can be provided using this option. |
|||
new_snapshot_name | str | New name for the snapshot. |
|||
state | str | True |
|
The state option is used to mention the existence of the snapshot. |
|
host_name | str | The name of the host. Either host_name or host_id is required to map or unmap a snapshot from a host. Snapshot can be attached to multiple hosts. |
|||
host_id | str | The id of the host. Either host_name or host_id is required to map or unmap a snapshot from a host. Snapshot can be attached to multiple hosts. |
|||
host_state | str |
|
The host_state option is used to mention the existence of the host for snapshot. It is required when a snapshot is mapped or unmapped from host. |
||
unispherehost | str | True | IP or FQDN of the Unity management server. |
||
username | str | True | The username of the Unity management server. |
||
password | str | True | The password of the Unity management server. |
||
verifycert | bool | True | 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. |
||
port | int | 443 | Port number through which communication happens with Unity management server. |
- name: Create a Snapshot for a CG
dellemc.unity.snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
port: "{{port}}"
cg_name: "{{cg_name}}"
snapshot_name: "{{cg_snapshot_name}}"
description: "{{description}}"
auto_delete: False
state: "present"
- name: Create a Snapshot for a volume with Host attached
dellemc.unity.snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
port: "{{port}}"
vol_name: "{{vol_name}}"
snapshot_name: "{{vol_snapshot_name}}"
description: "{{description}}"
expiry_time: "04/15/2025 16:30"
host_name: "{{host_name}}"
host_state: "mapped"
state: "present"
- name: Unmap a host for a Snapshot
dellemc.unity.snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
port: "{{port}}"
snapshot_name: "{{vol_snapshot_name}}"
host_name: "{{host_name}}"
host_state: "unmapped"
state: "present"
- name: Map snapshot to a host
dellemc.unity.snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
port: "{{port}}"
snapshot_name: "{{vol_snapshot_name}}"
host_name: "{{host_name}}"
host_state: "mapped"
state: "present"
- name: Update attributes of a Snapshot for a volume
dellemc.unity.snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
snapshot_name: "{{vol_snapshot_name}}"
new_snapshot_name: "{{new_snapshot_name}}"
description: "{{new_description}}"
host_name: "{{host_name}}"
host_state: "unmapped"
state: "present"
- name: Delete Snapshot of CG
dellemc.unity.snapshot:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
snapshot_name: "{{cg_snapshot_name}}"
state: "absent"
Key | Type | Returned | Description | |
---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |
filesystem_snapshot_details | complex | When filesystem snapshot exists | Details of the filesystem snapshot. | |
access_type | str | success | Access type of filesystem snapshot. | |
attached_wwn | str | success | Attached WWN details. | |
creation_time | str | success | Creation time of filesystem snapshot. | |
creator_schedule | str | success | Creator schedule of filesystem snapshot. | |
creator_type | str | success | Creator type for filesystem snapshot. | |
creator_user | str | success | Creator user for filesystem snapshot. | |
description | str | success | Description of the filesystem snapshot. | |
expiration_time | str | success | Date and time after which the filesystem snapshot will expire. | |
filesystem_id | str | success | Id of the filesystem for which the snapshot exists. | |
filesystem_name | str | success | Name of the filesystem for which the snapshot exists. | |
id | str | success | Unique identifier of the filesystem snapshot instance. | |
is_auto_delete | bool | success | Is the filesystem snapshot is auto deleted or not. | |
name | str | success | The name of the filesystem snapshot. | |
nas_server_id | str | success | Id of the NAS server on which filesystem exists. | |
nas_server_name | str | success | Name of the NAS server on which filesystem exists. | |
size | int | success | Size of the filesystem snapshot. |
- P Srinivas Rao (@srinivas-rao5) [email protected]
Manage SMB shares on Unity storage system
Managing SMB Shares on Unity storage system includes create, get, modify, and delete the smb shares.
Parameter | Type | Required | Default | Choices | Description |
---|---|---|---|---|---|
share_name | str | Name of the SMB share. Required during creation of the SMB share. For all other operations either share_name or share_id is required. |
|||
share_id | str | ID of the SMB share. Should not be specified during creation. Id is auto generated. For all other operations either share_name or share_id is required. If share_id is used then no need to pass nas_server/filesystem/snapshot/path. |
|||
path | str | Local path to the file system/Snapshot or any existing sub-folder of the file system/Snapshot that is shared over the network. Path is relative to the root of the filesystem. Required for creation of the SMB share. |
|||
filesystem_id | str | The ID of the File System. Either filesystem_name or filesystem_id is required for creation of the SMB share for filesystem. If filesystem name is specified, then nas_server_name/nas_server_id is required to uniquely identify the filesystem. filesystem_name and filesystem_id are mutually exclusive parameters. |
|||
snapshot_id | str | The ID of the Filesystem Snapshot. Either snapshot_name or snapshot_id is required for creation of the SMB share for a snapshot. If snapshot name is specified, then nas_server_name/nas_server_id is required to uniquely identify the snapshot. snapshot_name and snapshot_id are mutually exclusive parameters. |
|||
nas_server_id | str | The ID of the NAS Server. It is not required if share_id is used. |
|||
filesystem_name | str | The Name of the File System. Either filesystem_name or filesystem_id is required for creation of the SMB share for filesystem. If filesystem name is specified, then nas_server_name/nas_server_id is required to uniquely identify the filesystem. filesystem_name and filesytem_id are mutually exclusive parameters. |
|||
snapshot_name | str | The Name of the Filesystem Snapshot. Either snapshot_name or snapshot_id is required for creation of the SMB share for a snapshot. If snapshot name is specified, then nas_server_name/nas_server_id is required to uniquely identify the snapshot. snapshot_name and snapshot_id are mutually exclusive parameters. |
|||
nas_server_name | str | The Name of the NAS Server. It is not required if share_id is used. nas_server_name and nas_server_id are mutually exclusive parameters. |
|||
description | str | Description for the SMB share. Optional parameter when creating a share. To modify, pass the new value in description field. |
|||
is_abe_enabled | bool | Indicates whether Access-based Enumeration (ABE) for SMB share is enabled. During creation, if not mentioned then default is False. |
|||
is_branch_cache_enabled | bool | Indicates whether Branch Cache optimization for SMB share is enabled. During creation, if not mentioned then default is False. |
|||
is_continuous_availability_enabled | bool | Indicates whether continuous availability for SMB 3.0 is enabled. During creation, if not mentioned then default is False. |
|||
is_encryption_enabled | bool | Indicates whether encryption for SMB 3.0 is enabled at the shared folder level. During creation, if not mentioned then default is False. |
|||
offline_availability | str |
|
Defines valid states of Offline Availability. MANUAL- Only specified files will be available offline. DOCUMENTS- All files that users open will be available offline. PROGRAMS- Program will preferably run from the offline cache even when connected to the network. All files that users open will be available offline. NONE- Prevents clients from storing documents and programs in offline cache. |
||
umask | str | The default UNIX umask for new files created on the SMB Share. |
|||
state | str | True |
|
Define whether the SMB share should exist or not. present indicates that the share should exist on the system. absent indicates that the share should not exist on the system. |
|
unispherehost | str | True | IP or FQDN of the Unity management server. |
||
username | str | True | The username of the Unity management server. |
||
password | str | True | The password of the Unity management server. |
||
verifycert | bool | True | 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. |
||
port | int | 443 | Port number through which communication happens with Unity management server. |
- When ID/Name of the filesystem/snapshot is passed then nas_server is not required. If passed, then filesystem/snapshot should exist for the mentioned nas_server, else the task will fail.
- name: Create SMB share for a filesystem
dellemc.unity.smbshare:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
share_name: "sample_smb_share"
filesystem_name: "sample_fs"
nas_server_id: "NAS_11"
path: "/sample_fs"
description: "Sample SMB share created"
is_abe_enabled: True
is_branch_cache_enabled: True
offline_availability: "DOCUMENTS"
is_continuous_availability_enabled: True
is_encryption_enabled: True
umask: "777"
state: "present"
- name: Modify Attributes of SMB share for a filesystem
dellemc.unity.smbshare:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
share_name: "sample_smb_share"
nas_server_name: "sample_nas_server"
description: "Sample SMB share attributes updated"
is_abe_enabled: False
is_branch_cache_enabled: False
offline_availability: "MANUAL"
is_continuous_availability_enabled: "False"
is_encryption_enabled: "False"
umask: "022"
state: "present"
- name: Create SMB share for a snapshot
dellemc.unity.smbshare:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
share_name: "sample_snap_smb_share"
snapshot_name: "sample_snapshot"
nas_server_id: "NAS_11"
path: "/sample_snapshot"
description: "Sample SMB share created for snapshot"
is_abe_enabled: True
is_branch_cache_enabled: True
is_continuous_availability_enabled: True
is_encryption_enabled: True
umask: "777"
state: "present"
- name: Modify Attributes of SMB share for a snapshot
dellemc.unity.smbshare:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
share_name: "sample_snap_smb_share"
snapshot_name: "sample_snapshot"
description: "Sample SMB share attributes updated for snapshot"
is_abe_enabled: False
is_branch_cache_enabled: False
offline_availability: "MANUAL"
is_continuous_availability_enabled: "False"
is_encryption_enabled: "False"
umask: "022"
state: "present"
- name: Get details of SMB share
dellemc.unity.smbshare:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
share_id: "{{smb_share_id}}"
state: "present"
- name: Delete SMB share
dellemc.unity.smbshare:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
share_id: "{{smb_share_id}}"
state: "absent"
Key | Type | Returned | Description | |
---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |
smb_share_details | complex | When share exists. | The SMB share details. | |
description | str | success | Additional information about the share. | |
filesystem_id | str | success | The ID of the Filesystem. | |
filesystem_name | str | success | The Name of the filesystem | |
id | str | success | The ID of the SMB share. | |
is_abe_enabled | bool | success | Whether Access Based enumeration is enforced or not | |
is_branch_cache_enabled | bool | success | Whether branch cache is enabled or not. | |
is_continuous_availability_enabled | bool | success | Whether the share will be available continuously or not | |
is_encryption_enabled | bool | success | Whether encryption is enabled or not. | |
name | str | success | Name of the SMB share. | |
nas_server_id | str | success | The ID of the nas_server. | |
nas_server_name | str | success | The Name of the nas_server. | |
snapshot_id | str | success | The ID of the Snapshot. | |
snapshot_name | str | success | The Name of the Snapshot. | |
umask | str | success | Unix mask for the SMB share |
- P Srinivas Rao (@srinivas-rao5) [email protected]
Manage Host operations on Unity
The Host module contains the operations Creation of a Host, Addition of initiators to Host, Removal of initiators from Host, Modification of host attributes, Get details of a Host, Deletion of a Host, Addition of network address to Host, Removal of network address from Host.
Parameter | Type | Required | Default | Choices | Description |
---|---|---|---|---|---|
host_name | str | Name of the host. Mandatory for host creation. |
|||
host_id | str | Unique identifier of the host. host_id is auto generated during creation. Except create, all other operations require either host_id or host_name. |
|||
description | str | Host description. |
|||
host_os | str |
|
Operating system running on the host. |
||
new_host_name | str | New name for the host. Only required in rename host operation. |
|||
initiators | list elements: str |
List of initiators to be added/removed to/from host. |
|||
initiator_state | str |
|
State of the initiator. |
||
network_address | str | Network address to be added/removed to/from the host. Enter valid IPV4 or host name. |
|||
network_address_state | str |
|
State of the Network address. |
||
state | str | True |
|
State of the host. |
|
unispherehost | str | True | IP or FQDN of the Unity management server. |
||
username | str | True | The username of the Unity management server. |
||
password | str | True | The password of the Unity management server. |
||
verifycert | bool | True | 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. |
||
port | int | 443 | Port number through which communication happens with Unity management server. |
- name: Create empty Host
dellemc.unity.host:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
host_name: "ansible-test-host"
host_os: "Linux"
description: "ansible-test-host"
state: "present"
- name: Create Host with Initiators
dellemc.unity.host:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
host_name: "ansible-test-host-1"
host_os: "Linux"
description: "ansible-test-host-1"
initiators:
- "iqn.1994-05.com.redhat:c38e6e8cfd81"
- "20:00:00:90:FA:13:81:8D:10:00:00:90:FA:13:81:8D"
initiator_state: "present-in-host"
state: "present"
- name: Modify Host using host_id
dellemc.unity.host:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
host_id: "Host_253"
new_host_name: "ansible-test-host-2"
host_os: "Mac OS"
description: "Ansible tesing purpose"
state: "present"
- name: Add Initiators to Host
dellemc.unity.host:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
host_name: "ansible-test-host-2"
initiators:
- "20:00:00:90:FA:13:81:8C:10:00:00:90:FA:13:81:8C"
initiator_state: "present-in-host"
state: "present"
- name: Get Host details using host_name
dellemc.unity.host:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
host_name: "ansible-test-host-2"
state: "present"
- name: Get Host details using host_id
dellemc.unity.host:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
host_id: "Host_253"
state: "present"
- name: Delete Host
dellemc.unity.host:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
host_name: "ansible-test-host-2"
state: "absent"
- name: Add network address to Host
dellemc.unity.host:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
host_name: "{{host_name}}"
network_address: "192.168.1.2"
network_address_state: "present-in-host"
state: "present"
- name: Delete network address from Host
dellemc.unity.host:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
host_name: "{{host_name}}"
network_address: "192.168.1.2"
network_address_state: "absent-in-host"
state: "present"
Key | Type | Returned | Description | |||||
---|---|---|---|---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |||||
host_details | complex | When host exists. | Details of the host. | |||||
description | str | success | Description about the host. | |||||
fc_host_initiators | complex | success | Details of the FC initiators associated with the host. | |||||
id | str | success | Unique identifier of the FC initiator path. | |||||
name | str | success | FC Qualified Name (WWN) of the initiator. | |||||
paths | complex | success | Details of the paths associated with the FC initiator. | |||||
id | str | success | Unique identifier of the path. | |||||
is_logged_in | bool | success | Indicates whether the host initiator is logged into the storage system. | |||||
host_luns | list | success | Details of luns attached to host. | |||||
id | str | success | The system ID given to the host. | |||||
iscsi_host_initiators | complex | success | Details of the ISCSI initiators associated with the host. | |||||
id | str | success | Unique identifier of the ISCSI initiator path. | |||||
name | str | success | ISCSI Qualified Name (IQN) of the initiator. | |||||
paths | complex | success | Details of the paths associated with the ISCSI initiator. | |||||
id | str | success | Unique identifier of the path. | |||||
is_logged_in | bool | success | Indicates whether the host initiator is logged into the storage system. | |||||
name | str | success | The name of the host. | |||||
network_addresses | list | success | List of network addresses mapped to the host. | |||||
os_type | str | success | Operating system running on the host. | |||||
type | str | success | HostTypeEnum of the host. |
- Rajshree Khare (@kharer5) [email protected]
Manage consistency groups on Unity storage system
Managing the consistency group on the Unity storage system includes creating new consistency group, adding volumes to consistency group, removing volumes from consistency group, mapping hosts to consistency group, unmapping hosts from consistency group, renaming consistency group, modifying attributes of consistency group, enabling replication in consistency group, disabling replication in consistency group and deleting consistency group.
Parameter | Type | Required | Default | Choices | Description | |
---|---|---|---|---|---|---|
cg_name | str | The name of the consistency group. It is mandatory for the create operation. Specify either cg_name or cg_id (but not both) for any operation. |
||||
cg_id | str | The ID of the consistency group. It can be used only for get, modify, add/remove volumes, or delete operations. |
||||
volumes | list elements: dict |
This is a list of volumes. Either the volume ID or name must be provided for adding/removing existing volumes from consistency group. If volumes are given, then vol_state should also be specified. Volumes cannot be added/removed from consistency group, if the consistency group or the volume has snapshots. |
||||
vol_id | str | The ID of the volume. |
||||
vol_name | str | The name of the volume. |
||||
vol_state | str |
|
String variable, describes the state of volumes inside consistency group. If volumes are given, then vol_state should also be specified. |
|||
new_cg_name | str | The new name of the consistency group, used in rename operation. |
||||
description | str | Description of the consistency group. |
||||
snap_schedule | str | Snapshot schedule assigned to the consistency group. Specifying an empty string "" removes the existing snapshot schedule from consistency group. |
||||
tiering_policy | str |
|
Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. |
|||
hosts | list elements: dict |
This is a list of hosts. Either the host ID or name must be provided for mapping/unmapping hosts for a consistency group. If hosts are given, then mapping_state should also be specified. Hosts cannot be mapped to a consistency group, if the consistency group has no volumes. When a consistency group is being mapped to the host, users should not use the volume module to map the volumes in the consistency group to hosts. |
||||
host_id | str | The ID of the host. |
||||
host_name | str | The name of the host. |
||||
mapping_state | str |
|
String variable, describes the state of hosts inside the consistency group. If hosts are given, then mapping_state should also be specified. |
|||
replication_params | dict | Settings required for enabling replication. |
||||
destination_cg_name | str | Name of the destination consistency group. Default value will be source consistency group name prefixed by 'DR_'. |
||||
replication_mode | str | True |
|
The replication mode. |
||
rpo | int | Maximum time to wait before the system syncs the source and destination LUNs. rpo should be specified if the replication_mode is asynchronous. The value should be in range of 5 to 1440. |
||||
replication_type | str | local |
|
Type of replication. |
||
remote_system | dict | Details of remote system to which the replication is being configured. remote_system should be specified if the replication_type is remote. |
||||
destination_pool_name | str | Name of pool to allocate destination Luns. Mutually exclusive with destination_pool_id. |
||||
destination_pool_id | str | Id of pool to allocate destination Luns. Mutually exclusive with destination_pool_name. |
||||
replication_state | str |
|
State of the replication. |
|||
state | str | True |
|
Define whether the consistency group should exist or not. |
||
unispherehost | str | True | IP or FQDN of the Unity management server. |
|||
username | str | True | The username of the Unity management server. |
|||
password | str | True | The password of the Unity management server. |
|||
verifycert | bool | True | 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. |
|||
port | int | 443 | Port number through which communication happens with Unity management server. |
- name: Create consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
cg_name: "{{cg_name}}"
description: "{{description}}"
snap_schedule: "{{snap_schedule1}}"
state: "present"
- name: Get details of consistency group using id
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
cg_id: "{{cg_id}}"
state: "present"
- name: Add volumes to consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
cg_id: "{{cg_id}}"
volumes:
- vol_name: "Ansible_Test-3"
- vol_id: "sv_1744"
vol_state: "{{vol_state_present}}"
state: "present"
- name: Rename consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
cg_name: "{{cg_name}}"
new_cg_name: "{{new_cg_name}}"
state: "present"
- name: Modify consistency group details
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
cg_name: "{{new_cg_name}}"
snap_schedule: "{{snap_schedule2}}"
tiering_policy: "{{tiering_policy1}}"
state: "present"
- name: Map hosts to a consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
cg_id: "{{cg_id}}"
hosts:
- host_name: "10.226.198.248"
- host_id: "Host_511"
mapping_state: "mapped"
state: "present"
- name: Unmap hosts from a consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
cg_id: "{{cg_id}}"
hosts:
- host_id: "Host_511"
- host_name: "10.226.198.248"
mapping_state: "unmapped"
state: "present"
- name: Remove volumes from consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
cg_name: "{{new_cg_name}}"
volumes:
- vol_name: "Ansible_Test-3"
- vol_id: "sv_1744"
vol_state: "{{vol_state_absent}}"
state: "present"
- name: Delete consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
cg_name: "{{new_cg_name}}"
state: "absent"
- name: Enable replication for consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
cg_id: "cg_id_1"
replication_params:
destination_cg_name: "destination_cg_1"
replication_mode: "asynchronous"
rpo: 60
replication_type: "remote"
remote_system:
remote_system_host: '10.1.2.3'
remote_system_verifycert: False
remote_system_username: 'username'
remote_system_password: 'password'
destination_pool_name: "pool_test_1"
replication_state: "enable"
state: "present"
- name: Disable replication for consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
verifycert: "{{verifycert}}"
cg_name: "dis_repl_ans_source"
replication_state: "disable"
state: "present"
Key | Type | Returned | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |||||||||
consistency_group_details | complex | When consistency group exists | Details of the consistency group. | |||||||||
block_host_access | complex | success | Details of hosts mapped to the consistency group | |||||||||
UnityBlockHostAccessList | complex | success | List of hosts mapped to consistency group | |||||||||
UnityBlockHostAccess | complex | success | Details of host | |||||||||
cg_replication_enabled | bool | success | Whether or not the replication is enabled. | |||||||||
id | str | success | The system ID given to the consistency group | |||||||||
luns | complex | success | Details of volumes part of consistency group | |||||||||
UnityLunList | complex | success | List of volumes part of consistency group | |||||||||
UnityLun | complex | success | Detail of volume | |||||||||
relocation_policy | str | success | FAST VP tiering policy for the consistency group | |||||||||
snap_schedule | complex | success | Snapshot schedule applied to consistency group | |||||||||
UnitySnapSchedule | complex | success | Snapshot schedule applied to consistency group | |||||||||
id | str | success | The system ID given to the snapshot schedule | |||||||||
name | str | success | The name of the snapshot schedule | |||||||||
snapshots | complex | success | List of snapshots of consistency group | |||||||||
creation_time | str | success | Date and time on which the snapshot was taken | |||||||||
expirationTime | str | success | Date and time after which the snapshot will expire | |||||||||
name | str | success | Name of the snapshot | |||||||||
storageResource | complex | success | Storage resource for which the snapshot was taken | |||||||||
UnityStorageResource | complex | success | Details of the storage resource |
- Akash Shendge (@shenda1) [email protected]
Manage snapshot schedules on Unity storage system
Managing snapshot schedules on Unity storage system includes creating new snapshot schedule, getting details of snapshot schedule, modifying attributes of snapshot schedule, and deleting snapshot schedule.
Parameter | Type | Required | Default | Choices | Description |
---|---|---|---|---|---|
name | str | The name of the snapshot schedule. Name is mandatory for a create operation. Specify either name or id (but not both) for any operation. |
|||
id | str | The ID of the snapshot schedule. |
|||
type | str |
|
Type of the rule to be included in snapshot schedule. Type is mandatory for any create or modify operation. Once the snapshot schedule is created with one type it can be modified. |
||
interval | int | Number of hours between snapshots. Applicable only when rule type is 'every_n_hours'. |
|||
hours_of_day | list elements: int |
Hours of the day when the snapshot will be taken. Applicable only when rule type is 'every_day'. |
|||
day_interval | int | Number of days between snapshots. Applicable only when rule type is 'every_n_days'. |
|||
days_of_week | list elements: str |
|
Days of the week for which the snapshot schedule rule applies. Applicable only when rule type is 'every_week'. |
||
day_of_month | int | Day of the month for which the snapshot schedule rule applies. Applicable only when rule type is 'every_month'. Value should be [1, 31]. |
|||
hour | int | The hour when the snapshot will be taken. Applicable for 'every_n_days', 'every_week', 'every_month' rule types. For create operation, if 'hour' parameter is not specified, value will be taken as 0. Value should be [0, 23]. |
|||
minute | int | Minute offset from the hour when the snapshot will be taken. Applicable for all rule types. For a create operation, if 'minute' parameter is not specified, value will be taken as 0. Value should be [0, 59]. |
|||
desired_retention | int | The number of days/hours for which snapshot will be retained. When auto_delete is True, desired_retention cannot be specified. Maximum desired retention supported is 31 days or 744 hours. |
|||
retention_unit | str | hours |
|
The retention unit for the snapshot. |
|
auto_delete | bool | Indicates whether the system can automatically delete the snapshot. |
|||
state | str | True |
|
Define whether the snapshot schedule should exist or not. |
|
unispherehost | str | True | IP or FQDN of the Unity management server. |
||
username | str | True | The username of the Unity management server. |
||
password | str | True | The password of the Unity management server. |
||
verifycert | bool | True | 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. |
||
port | int | 443 | Port number through which communication happens with Unity management server. |
- Snapshot schedule created through Ansible will have only one rule.
- Modification of rule type is not allowed. Within the same type, other parameters can be modified.
- If an existing snapshot schedule has more than 1 rule in it, only get and delete operation is allowed.
- name: Create snapshot schedule (Rule Type - every_n_hours)
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
name: "Ansible_Every_N_Hours_Testing"
type: "every_n_hours"
interval: 6
desired_retention: 24
state: "{{state_present}}"
- name: Create snapshot schedule (Rule Type - every_day)
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
name: "Ansible_Every_Day_Testing"
type: "every_day"
hours_of_day:
- 8
- 14
auto_delete: True
state: "{{state_present}}"
- name: Create snapshot schedule (Rule Type - every_n_days)
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
name: "Ansible_Every_N_Day_Testing"
type: "every_n_days"
day_interval: 2
desired_retention: 16
retention_unit: "days"
state: "{{state_present}}"
- name: Create snapshot schedule (Rule Type - every_week)
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
name: "Ansible_Every_Week_Testing"
type: "every_week"
days_of_week:
- MONDAY
- FRIDAY
hour: 12
minute: 30
desired_retention: 200
state: "{{state_present}}"
- name: Create snapshot schedule (Rule Type - every_month)
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
name: "Ansible_Every_Month_Testing"
type: "every_month"
day_of_month: 17
auto_delete: True
state: "{{state_present}}"
- name: Get snapshot schedule details using name
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
name: "Ansible_Every_N_Hours_Testing"
state: "{{state_present}}"
- name: Get snapshot schedule details using id
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
id: "{{id}}"
state: "{{state_present}}"
- name: Modify snapshot schedule details id
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
id: "{{id}}"
type: "every_n_hours"
interval: 8
state: "{{state_present}}"
- name: Modify snapshot schedule using name
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
name: "Ansible_Every_Day_Testing"
type: "every_day"
desired_retention: 200
auto_delete: False
state: "{{state_present}}"
- name: Delete snapshot schedule using id
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
id: "{{id}}"
state: "{{state_absent}}"
- name: Delete snapshot schedule using name
dellemc.unity.snapshotschedule:
unispherehost: "{{unispherehost}}"
verifycert: "{{verifycert}}"
username: "{{username}}"
password: "{{password}}"
name: "Ansible_Every_Day_Testing"
state: "{{state_absent}}"
Key | Type | Returned | Description | |||||||
---|---|---|---|---|---|---|---|---|---|---|
changed | bool | always | Whether or not the resource has changed. | |||||||
snapshot_schedule_details | complex | When snapshot schedule exists | Details of the snapshot schedule. | |||||||
id | str | success | The system ID given to the snapshot schedule. | |||||||
luns | complex | success | Details of volumes for which snapshot schedule applied. | |||||||
UnityLunList | complex | success | List of volumes for which snapshot schedule applied. | |||||||
UnityLun | complex | success | Detail of volume. | |||||||
name | str | success | The name of the snapshot schedule. | |||||||
rules | complex | success | Details of rules that apply to snapshot schedule. | |||||||
days_of_month | list | success | Days of the month for which the snapshot schedule rule applies. | |||||||
days_of_week | complex | success | Days of the week for which the snapshot schedule rule applies. | |||||||
DayOfWeekEnumList | list | success | Enumeration of days of the week. | |||||||
hours | list | success | Hourly frequency for the snapshot schedule rule. | |||||||
id | str | success | The system ID of the rule. | |||||||
interval | int | success | Number of days or hours between snaps, depending on the rule type. | |||||||
is_auto_delete | bool | success | Indicates whether the system can automatically delete the snapshot based on pool automatic-deletion thresholds. | |||||||
minute | int | success | Minute frequency for the snapshot schedule rule. | |||||||
retention_time | int | success | Period of time in seconds for which to keep the snapshot. | |||||||
retention_time_in_hours | int | success | Period of time in hours for which to keep the snapshot. | |||||||
rule_type | str | success | Type of the rule applied to snapshot schedule. | |||||||
storage_resources | complex | success | Details of storage resources for which snapshot schedule applied. | |||||||
UnityStorageResourceList | complex | success | List of storage resources for which snapshot schedule applied. | |||||||
UnityStorageResource | complex | success | Detail of storage resource. |
- Akash Shendge (@shenda1) [email protected]