dellemc / dellemc.powerstore / 1.3.0 / module / dellemc_powerstore_nfs Manage NFS exports on Dell EMC PowerStore. | "added in version" 1.1.0 of dellemc.powerstore" Authors: Akash Shendge (@shenda1) <ansible.team@dell.com> preview | supported by communitydellemc.powerstore.dellemc_powerstore_nfs (1.3.0) — module
Install with ansible-galaxy collection install dellemc.powerstore:==1.3.0
collections: - name: dellemc.powerstore version: 1.3.0
Managing NFS exports on PowerStore Storage System includes creating new NFS Export, getting details of NFS export, modifying attributes of NFS export, and deleting NFS export.
- name: Create NFS export (filesystem) dellemc_powerstore_nfs: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" nfs_export_name: "{{export_name1}}" filesystem: "{{filesystem}}" nas_server: "{{nas_server}}" path: "{{path1}}" description: "sample description" default_access: "NO_ACCESS" no_access_hosts: - "{{host5}}" read_only_hosts: - "{{host1}}" read_only_root_hosts: - "{{host2}}" read_write_hosts: - "{{host3}}" read_write_root_hosts: - "{{host4}}" min_security: "SYS" anonymous_uid: 1000 anonymous_gid: 1000 is_no_suid: True host_state: "present-in-export" state: "present"
- name: Create NFS export Create NFS export for filesystem snapshot with mandatory parameters dellemc_powerstore_nfs: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" nfs_export_name: "{{export_name2}}" snapshot: "{{snapshot}}" nas_server: "{{nas_server}}" path: "{{path2}}" state: "present"
- name: Get NFS export details using ID dellemc_powerstore_nfs: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" nfs_export_id: "{{export_id}}" state: "present"
- name: Add Read-Only and Read-Write hosts to NFS export dellemc_powerstore_nfs: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" nfs_export_id: "{{export_id}}" read_only_hosts: - "{{host5}}" read_write_hosts: - "{{host6}}" host_state: "present-in-export" state: "present"
- name: Remove Read-Only and Read-Write hosts from NFS export dellemc_powerstore_nfs: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" nfs_export_id: "{{export_id}}" read_only_hosts: - "{{host1}}" read_write_hosts: - "{{host3}}" host_state: "absent-in-export" state: "present"
- name: Modify the attributes of NFS export dellemc_powerstore_nfs: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" nfs_export_id: "{{export_id}}" description: "modify description" default_access: "ROOT" state: "present"
- name: Delete NFS export using name dellemc_powerstore_nfs: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" nfs_export_name: "{{export_name}}" nas_server: "{{nas_server}}" 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. type: str user: description: - The username of the PowerStore host. required: true type: str state: choices: - absent - present description: - Define whether the NFS export should exist or not. required: true type: str array_ip: description: - IP or FQDN of the PowerStore management system. required: true type: str password: description: - The password of the PowerStore host. required: true type: str snapshot: description: - The ID/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 name is specified, then nas_server is required to uniquely identify the snapshot. - If snapshot parameter is provided, then filesystem cannot be specified. - NFS export can be created only if access type of snapshot is "protocol". type: str filesystem: description: - The ID/Name of the filesystem for which the NFS export will be created. - Either filesystem or snapshot is required for creation of the NFS Export. - 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. 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 host access from the export. type: str is_no_suid: description: - If set, do not allow access to set SUID. Otherwise, allow access. - If not specified at the time of creation, it will be set to False. type: bool nas_server: description: - The NAS server. This could be the name or ID of the NAS server. type: str verifycert: choices: - true - false description: - Boolean variable to specify whether to validate SSL certificate or not. - True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. - False - indicates that the SSL certificate should not be verified. required: true type: bool description: description: - The description for the NFS export. type: str min_security: choices: - SYS - KERBEROS - KERBEROS_WITH_INTEGRITY - KERBEROS_WITH_ENCRYPTION description: - NFS enforced security type for users accessing an NFS export. - If not specified at the time of creation, it will be set to SYS. 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 -2. 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 -2. type: int nfs_export_id: description: - The ID of the NFS export. 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 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. type: str nfs_export_name: description: - The name of the NFS export. - Mandatory for create operation. - Specify either nfs_export_name or nfs_export_id(but not both) for any operation. type: str no_access_hosts: description: - Hosts with no access to the NFS export. elements: str type: list read_only_hosts: description: - Hosts with read-only access to the NFS export. elements: str type: list read_write_hosts: description: - Hosts with read and write access to the NFS export. elements: str type: list read_only_root_hosts: description: - Hosts with read-only access for root user to the NFS export. elements: str type: list read_write_root_hosts: description: - Hosts with read and write access for root user to the NFS export. elements: str type: list
changed: description: Whether or not the resource has changed returned: always type: bool nfs_export_details: contains: anonymous_GID: description: The group ID of the anonymous account. type: int anonymous_UID: description: The user ID of the anonymous account. type: int default_access: description: Default access level for all hosts that can access the export. type: str description: description: The description for the NFS export. type: str file_system: contains: filesystem_type: description: The type of the filesystem. type: str id: description: The ID of the filesystem. type: str name: description: The name of the filesystem. type: str nas_server: contains: id: description: The ID of the NAS server. type: str name: description: The name of the NAS server. type: str description: Details of NAS server. type: complex description: Details of filesystem and NAS server on which NFS export is present. type: complex id: description: The ID of the NFS export. type: str is_no_SUID: description: If set, do not allow access to set SUID. Otherwise, allow access. type: bool min_security: description: NFS enforced security type for users accessing an NFS export. type: str name: description: The name of the NFS export. type: str no_access_hosts: description: Hosts with no access to the NFS export. type: list path: description: Local path to a location within the file system. type: str read_only_hosts: description: Hosts with read-only access to the NFS export. type: list read_only_root_hosts: description: Hosts with read-only for root user access to the NFS export. type: list read_write_hosts: description: Hosts with read and write access to the NFS export. type: list read_write_root_hosts: description: Hosts with read and write for root user access to the NFS export. type: list description: The NFS export details. returned: When NFS export exists. type: complex