dellemc / dellemc.unity / 1.2.1 / module / dellemc_unity_nfs Manage NFS export on Unity storage system | "added in version" 1.1.0 of dellemc.unity" Authors: Vivek Soni (@v-soni11) <ansible.team@dell.com> preview | supported by communitydellemc.unity.dellemc_unity_nfs (1.2.1) — module
Install with ansible-galaxy collection install dellemc.unity:==1.2.1
collections: - name: dellemc.unity version: 1.2.1
Managing NFS export on Unity storage system includes- Create new NFS export, Modify NFS export attributes, Display NFS export details, Delete NFS export
- name: Create nfs export from filesystem dellemc.unity.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.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.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.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.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.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.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"
path: description: - 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. required: false type: str port: default: 443 description: - Port number through which communication happens with Unity management server. required: false type: int state: choices: - absent - present description: - State variable to determine whether NFS export will exist or not. required: true type: str password: description: - The password of the Unity management server. required: true type: str username: description: - The username of the Unity management server. required: true type: str host_state: choices: - present-in-export - absent-in-export description: - Define whether the hosts can access the NFS export. - Required when adding or removing access of hosts from the export. required: false type: str verifycert: choices: - true - false default: true description: - Boolean variable to specify whether or not to validate SSL certificate. - True - Indicates that the SSL certificate should be verified. - False - Indicates that the SSL certificate should not be verified. required: false type: bool description: description: - 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. required: false type: str snapshot_id: description: - ID of the snapshot. - This is a unique ID generated by Unity storage system. required: false type: str min_security: choices: - SYS - KERBEROS - KERBEROS_WITH_INTEGRITY - KERBEROS_WITH_ENCRYPTION description: - NFS enforced security type for users accessing a NFS export. - If not specified at the time of creation, it will be set to SYS. required: false type: str anonymous_gid: description: - Specifies the group ID of the anonymous account. - If not specified at the time of creation, it will be set to 4294967294. required: false type: int anonymous_uid: description: - Specifies the user ID of the anonymous account. - If not specified at the time of creation, it will be set to 4294967294. required: false type: int filesystem_id: description: - ID of the filesystem. - This is a unique ID generated by Unity storage system. required: false type: str nas_server_id: description: - ID of the NAS server on which filesystem will be hosted. required: false type: str nfs_export_id: description: - ID of the nfs export. - This is a unique ID generated by Unity storage system. required: false type: str snapshot_name: description: - 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. required: false type: str unispherehost: description: - IP or FQDN of the Unity management server. required: true type: str default_access: choices: - NO_ACCESS - READ_ONLY - READ_WRITE - ROOT - READ_ONLY_ROOT description: - 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. required: false type: str filesystem_name: description: - 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. required: false type: str nas_server_name: description: - Name of the NAS server on which filesystem will be hosted. required: false type: str nfs_export_name: description: - Name of the nfs export. - Mandatory for create operation. - Specify either nfs_export_name or nfs_export_id(but not both) for any operation. required: false type: str no_access_hosts: description: - 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. elements: dict required: false suboptions: host_id: description: - ID of the host. required: false type: str host_name: description: - Name of the host. required: false type: str ip_address: description: - IP address of the host. required: false type: str type: list read_only_hosts: description: - 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. elements: dict required: false suboptions: host_id: description: - ID of the host. required: false type: str host_name: description: - Name of the host. required: false type: str ip_address: description: - IP address of the host. required: false type: str type: list read_write_hosts: description: - 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. elements: dict required: false suboptions: host_id: description: - ID of the host. required: false type: str host_name: description: - Name of the host. required: false type: str ip_address: description: - IP address of the host. required: false type: str type: list read_only_root_hosts: description: - 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. elements: dict required: false suboptions: host_id: description: - ID of the host. required: false type: str host_name: description: - Name of the host. required: false type: str ip_address: description: - IP address of the host. required: false type: str type: list read_write_root_hosts: description: - 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. elements: dict required: false suboptions: host_id: description: - ID of the host. required: false type: str host_name: description: - Name of the host. required: false type: str ip_address: description: - IP address of the host. required: false type: str type: list
changed: description: Whether or not the resource has changed. returned: always type: bool nfs_share_details: contains: anonymous_gid: description: Group ID of the anonymous account type: int anonymous_uid: description: User ID of the anonymous account type: int default_access: description: Default access level for all hosts that can access export type: str description: description: Description about the nfs export type: str export_paths: description: Export paths that can be used to mount and access export type: list filesystem: contains: UnityFileSystem: contains: id: description: ID of the filesystem type: str name: description: Name of the filesystem type: str description: filesystem details type: complex description: Details of the filesystem on which nfs export is present type: complex id: description: ID of the nfs export type: str min_security: description: NFS enforced security type for users accessing an export type: str name: description: Name of the nfs export type: str nas_server: contains: UnityNasServer: contains: id: description: ID of the nas server type: str name: description: Name of the nas server type: str description: NAS server details type: complex description: Details of the nas server type: complex no_access_hosts_string: description: Hosts with no access to the nfs export type: str read_only_hosts_string: description: Hosts with read-only access to the nfs export type: str read_only_root_hosts_string: description: Hosts with read-only for root user access to the nfs export type: str read_write_hosts_string: description: Hosts with read and write access to the nfs export type: str read_write_root_hosts_string: description: Hosts with read and write for root user access to export type: str type: description: NFS export type. i.e. filesystem or snapshot type: str description: Details of the nfs export. returned: When nfs export exists. type: complex