arensb.truenas.nfs module – Configure NFS service
Note
This module is part of the arensb.truenas collection (version 1.11.4).
To install it, use: ansible-galaxy collection install arensb.truenas
.
To use it in a playbook, specify: arensb.truenas.nfs
.
New in arensb.truenas 0.4.0
Synopsis
Configure the NFS service.
For individual NFS exports, see
sharing_nfs
Parameters
Parameter |
Comments |
---|---|
When true, allow non-root requests to be served. Sets the Choices:
|
|
List of IP addresses on which to listen for NFS requests. When this is the empty list, listen on all available addresses. |
|
Overrides the default DNS domain name for NFSv4. Passes the Ignored unless |
|
Turn on Kerberos for NFSv4. Forces shares to fail without a Kerberos ticket. This enables the Ignored unless |
|
When true, log successful mount requests. Passes the Choices:
|
|
Specifies the port that This passes the |
|
If true, enable NFSv4. Otherwise, use NFSv3. Deprecated. Use `protocols` instead. Choices:
|
|
List of supported protocols. The elements are any of `nfsv3`, `nfsv4` or their synonyms. Choices:
|
|
Specifies the port that This passes the |
|
Specifies the port that This passes the |
|
The number of NFS servers to create. This value is passed to the |
|
When true, turn on extra logging of Passes the These are debugging flags and are not normally needed. Choices:
|
|
If true, serve UDP clients. Use this if you have NFS clients that have to use UDP. This sets the Choices:
|
|
Use this when a user is a member of more than 16 groups. Passes the Choices:
|
|
Enable the NFSv3 ownership model for NFSv4. Ignored unless NFSv4 is turned on through `protocols` or `nfsv4`. |
Examples
- name: Enable UDP
hosts: nfs_server
become: yes
tasks:
- arensb.truenas.nfs:
udp: yes
- name: Forbid mount requests from non-root accounts
hosts: nfs_server
become: yes
tasks:
- arensb.truenas.nfs:
allow_nonroot: false
- name: Run 32 servers
hosts: nfs_server
become: yes
tasks:
- arensb.truenas.nfs:
servers: 32
- name: Enable NFS v3 and v4
hosts: nfs_server
become: yes
tasks:
- arensb.truenas.nfs:
protocols:
- NFSv3
- NFSv4
- name: Enable v4. Disable v3 if possible.
hosts: nfs_server
become: yes
tasks:
- arensb.truenas.nfs:
protocols: NFSv4
# `nfsv4` is deprecated.
- name: Enable NFSv4
hosts: nfs_server
become: yes
tasks:
- arensb.truenas.nfs:
nfsv4: yes
- name: Enable NFS v3 ownership model under v4
hosts: nfs_server
become: yes
tasks:
- arensb.truenas.nfs:
v3owner: true
- name: Turn on Kerberos
hosts: nfs_server
become: yes
tasks:
- arensb.truenas.nfs:
krb: true
- name: Listen on a specific interface
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A data structure describing the state of the NFS service. In check_mode and when no changes are needed, this is the current state of the NFS service. When changes have successfully been made, this is the new state of the NFS service. Returned: success |