arensb.truenas.sharing_nfs module – Manage NFS sharing
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.sharing_nfs
.
New in arensb.truenas 0.1.0
Synopsis
Create, manage, and delete NFS exports.
Parameters
Parameter |
Comments |
---|---|
Allows clients to mount any subdirectory of the exported directory. Can only be used on exports that contain only one directory. False by default when a share is created. Choices:
|
|
Whether or not this export should be enabled. Exports that are not enabled exist in the middleware database, but are not listed in True by default when a share is created. Choices:
|
|
List of allowed hosts, either hostnames or addresses. An empty list means to allow all. |
|
All requests (including by root) are limited to the permissions of this group. Set to the empty string ( Mutually-exclusive with Requires |
|
All requests (including by root) are limited to the permissions of this user. Set to the empty string ( Mutually-exclusive with |
|
Requests by user root are also limited to the permissions of this group. Set to the empty string ( Mutually-exclusive with Requires |
|
Requests by user root are limited to the permissions of this user. Set to the empty string ( Mutually-exclusive with |
|
Name for this export group. This will show up as the comment. Default: |
|
List of allowed networks, in CIDR notation. An empty list means to allow all. Note that using incorrect CIDR may lead to this module seeing a change when nothing has changed. For example, if you specify “10.1.2.3/16”, TrueNAS will normalize this to “10.1.0.0/16”, but afterward, this module will think that you want to make a change. |
|
A directory to export. |
|
Deprecated; use List of directories to export. All paths must be in the same filesystem. And if multiple directories from the same filesystem are being imported, they must be in the same NFS export. |
|
Suppress certain error messages. This can be used to avoid spamming log files with messages about known errors. See exports(5) for examples. False by default when a share is created. Choices:
|
|
Whether the directories are exported read-only, to prohibit clients from writing to them. Choices:
|
|
Whether this export should exist or not. Choices:
|
Examples
- name: Export a filesystem
arensb.truenas.sharing_nfs:
- name: Home export
path: /mnt/pool0/home
- name: Export to only one network
arensb.truenas.sharing_nfs:
- name: Home export
path: /mnt/pool0/home
networks:
- 192.168.0.0/16
- name: Explicitly export to all hosts and networks
arensb.truenas.sharing_nfs:
- name: Home export
path: /mnt/pool0/home
hosts: []
networks: []