Default variable details¶
debops.nfs default variables have more extensive configuration than
simple strings or lists, here you can find documentation and examples for them.
- Required. Absolute path of a directory where the given NFS share should be mounted. If the directory does not exist, it will be created by the role.
Required. Mount point "source", usually in the form of:
You can use either DNS names or IP addresses.
NOTE: If you want to use NFSv4 mount points, you need to specify share paths relative to the NFS
rootdirectory configured on the nfs server.
- Optional. If not specified or
mounted, the given NFS share will be added to the
/etc/fstabconfiguration file and automatically mounted. If
present, the NFS mount will be added to the
/etc/fstabbut its state will not be changed. If
unmounted, and the NFS share is mounted, it will be unmounted. If
absent, the NFS share will be unmounted and its entry will be removed from
- Optional. A comma-separated string or a YAML list of mount options which should be used with a given NFS share. If not specified, the role will use a set of default options that configure the mount to be a network NFS4 share.
- Optional, boolean. If present and
False, the role will not add the default options to the custom ones provided by the user, which will allow full control over the configuration. The
_netdevoption is always added to ensure that the
/etc/fstabconfiguration file remains valid.
- Optional. Specify the filesystem type to use for the mount point. By default
- Optional. Additional parameters passed to the Ansible
mountmodule, by default omitted since they are not useful for NFS shares. See the module documentation page for more details.
- Optional. Specify UNIX account, group and directory permissions for the mount point of a given NFS share. They will be applied to the directories created by the role when the NFS share is not mounted immediately.
Mount a NFS4 share with automatic configuration:
nfs__shares: - path: '/media/nfs/shared' src: 'nas.example.org:/shared'