netapp.ontap.na_ontap_nfs module – NetApp ONTAP NFS status
Note
This module is part of the netapp.ontap collection (version 22.13.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install netapp.ontap
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: netapp.ontap.na_ontap_nfs
.
New in netapp.ontap 2.6.0
Synopsis
Enable or disable NFS on ONTAP
Requirements
The below requirements are needed on the host that executes this module.
Ansible 2.9 or later - 2.12 or later is recommended.
Python3 - 3.9 or later is recommended.
When using ZAPI, netapp-lib 2018.11.13 or later (install using ‘pip install netapp-lib’), netapp-lib 2020.3.12 is strongly recommended as it provides better error reporting for connection issues.
A physical or virtual clustered Data ONTAP system, the modules support Data ONTAP 9.1 and onward, REST support requires ONTAP 9.6 or later.
Parameters
Parameter |
Comments |
---|---|
path to SSL client cert file (.pem). not supported with python 2.6. |
|
Enable or disable a new feature. This can be used to enable an experimental feature or disable a new feature that breaks backward compatibility. Supported keys and values are subject to change without notice. Unknown keys are ignored. |
|
Override the cluster ONTAP version when using REST. The behavior is undefined if the version does not match the target cluster. This is provided as a work-around when the cluster version cannot be read because of permission issues. See https://github.com/ansible-collections/netapp.ontap/wiki/Known-issues. This should be in the form 9.10 or 9.10.1 with each element being an integer number. When Ignored with ZAPI. |
|
The hostname or IP address of the ONTAP instance. |
|
Override the default port (80 or 443) with this port |
|
Enable and disable https. Ignored when using REST as only https is supported. Ignored when using SSL certificate authentication as it requires SSL. Choices:
|
|
path to SSL client key file. |
|
status of NFSv3. Choices:
|
|
status of if NFSv3 clients see change in FSID as they traverse filesystems. Choices:
|
|
status of NFSv4. Choices:
|
|
status of NFS v4.0 ACL feature Choices:
|
|
status for NFS v4.0 read delegation feature. Choices:
|
|
status for NFS v4.0 referrals. Choices:
|
|
status for NFS v4.0 write delegation feature. Choices:
|
|
status of NFSv41. usage of please use Choices:
|
|
status of NFS v4.1 ACL feature Choices:
|
|
status of NFSv41 pNFS. Choices:
|
|
status for NFS v4.1 read delegation feature. Choices:
|
|
status for NFS v4.1 referrals. Choices:
|
|
status for NFS v4.1 write delegation feature. Choices:
|
|
status of if NFSv4 clients see change in FSID as they traverse filesystems. Choices:
|
|
Name of the nfsv4_id_domain to use. |
|
status of NFSv4 numeric ID’s. Choices:
|
|
The ontap api version to use |
|
Password for the specified user. |
|
This option can be set or modified when using REST. It requires ONTAP 9.11.0 or later. |
|
Specifies whether Windows ACLs affect root access from NFS. If this option is enabled, root access from NFS ignores the NT ACL set on the file or directory. Choices:
|
|
Specifies if permission checks are to be skipped for NFS WRITE calls from root/owner. For copying read-only files to a destination folder which has inheritable ACLs, this option must be enabled. Choices:
|
|
This option can be set or modified when using REST. It requires ONTAP 9.11.0 or later. |
|
Specifies whether file ownership can be changed only by the superuser, or if a non-root user can also change file ownership. If this option is set to restricted, file ownership can be changed only by the superuser, even though the on-disk permissions allow a non-root user to change file ownership. If this option is set to unrestricted, file ownership can be changed by the superuser and by the non-root user, depending upon the access granted by on-disk permissions. If this option is set to use-export-policy, file ownership can be changed in accordance with the relevant export rules. Choices:
|
|
Controls the permissions that are displayed to NFSv3 and NFSv4 clients on a file or directory that has an NT ACL set. When true, the displayed permissions are based on the maximum access granted by the NT ACL to any user. When false, the displayed permissions are based on the minimum access granted by the NT ACL to any user. Choices:
|
|
Specifies how NFSv3 security changes affect NTFS volumes. If this option is set to ignore, ONTAP ignores NFSv3 security changes. If this option is set to fail, this overrides the UNIX security options set in the relevant export rules. If this option is set to use_export_policy, ONTAP processes NFSv3 security changes in accordance with the relevant export rules. Choices:
|
|
Specifies the permitted encryption types for Kerberos over NFS. |
|
Specifies, in seconds, the amount of time a RPCSEC_GSS context is permitted to remain unused before it is deleted. |
|
Whether the specified NFS should be enabled or disabled. Creates NFS service if doesnt exist. Choices:
|
|
Whether SVM allows showmount. With REST, supported from ONTAP 9.8 version. Choices:
|
|
Whether NFS should exist or not. Choices:
|
|
Enable TCP (support from ONTAP 9.3 onward). Choices:
|
|
TCP Maximum Transfer Size (bytes). The default value is 65536. This option requires ONTAP 9.11.0 or later in REST. |
|
Enable UDP (support from ONTAP 9.3 onward). Choices:
|
|
Whether to use REST or ZAPI. always – will always use the REST API if the module supports REST. A warning is issued if the module does not support REST. An error is issued if a module option is not supported in REST. never – will always use ZAPI if the module supports ZAPI. An error may be issued if a REST option is not supported in ZAPI. auto – will try to use the REST API if the module supports REST and modules options are supported. Reverts to ZAPI otherwise. Default: |
|
This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required. For more information, please read the documentation https://mysupport.netapp.com/NOW/download/software/nmsdk/9.4/. Two authentication methods are supported
To use a certificate, the certificate must have been installed in the ONTAP cluster, and cert authentication must have been enabled. |
|
If set to This should only set to Choices:
|
|
Name of the vserver to use. |
|
status of vstorage_state. Choices:
|
|
This option can be set or modified when using REST. It requires ONTAP 9.11.0 or later. |
|
Specifies the default Windows user for the NFS server. |
|
Specifies whether or not the mapping of an unknown UID to the default Windows user is enabled. Choices:
|
|
Specifies whether NFSv3 MS-DOS client support is enabled. Choices:
|
Notes
Note
The modules prefixed with na_ontap are built to support the ONTAP storage platform.
https is enabled by default and recommended. To enable http on the cluster you must run the following commands ‘set -privilege advanced;’ ‘system services web modify -http-enabled true;’
Examples
- name: change nfs status
netapp.ontap.na_ontap_nfs:
state: present
service_state: stopped
vserver: vs_hack
nfsv3: disabled
nfsv4: disabled
nfsv41: enabled
tcp: disabled
udp: disabled
vstorage_state: disabled
nfsv4_id_domain: example.com
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: create nfs configuration - REST
netapp.ontap.na_ontap_nfs:
state: present
service_state: stopped
vserver: vs_hack
nfsv3: disabled
nfsv4: disabled
nfsv41: enabled
tcp: disabled
udp: disabled
vstorage_state: disabled
nfsv4_id_domain: example.com
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: Modify nfs configuration - REST
netapp.ontap.na_ontap_nfs:
state: present
vserver: vs_hack
root:
ignore_nt_acl: true
skip_write_permission_check: true
security:
chown_mode: restricted
nt_acl_display_permission: true
ntfs_unix_security: fail
rpcsec_context_idle: 5
windows:
v3_ms_dos_client_enabled: true
map_unknown_uid_to_default_user: false
default_user: test_user
tcp_max_xfer_size: 16384
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"
- name: Delete nfs configuration
netapp.ontap.na_ontap_nfs:
state: absent
vserver: vs_hack
hostname: "{{ netapp_hostname }}"
username: "{{ netapp_username }}"
password: "{{ netapp_password }}"