Default variable details

Some of debops.nfs default variables have more extensive configuration than simple strings or lists, here you can find documentation and examples for them.


The nfs__shares, nfs__group_shares and nfs__host_shares are list of NFS shares to configure on a host. Each list element is a YAML dictionary with specific parameters:

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.

Optional. If not specified or mounted, the given NFS share will be added to the /etc/fstab configuration file and automatically mounted. If present, the NFS mount will be added to the /etc/fstab but 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 /etc/fstab configuration file.
options or opts
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 _netdev option is always added to ensure that the /etc/fstab configuration file remains valid.
Optional. Specify the filesystem type to use for the mount point. By default it's nfs4.
passno, dump, fstab
Optional. Additional parameters passed to the Ansible mount module, by default omitted since they are not useful for NFS shares. See the module documentation page for more details.
owner, group, mode
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:

  - path: '/media/nfs/shared'
    src: ''