Ansible Role nfs_client

This role installs NFS client utilities and controls active and configured NFS mount points in /etc/fstab.

Tags

Tag

What it does

nfs_client

  • Install nfs-utils on RedHat-Based systems or nfs-common on Debian-Based systems
  • mkdir -p nfs-mount-point
  • Mount NFS volumes

Optional Role Variables

Variable

Description

Default Value

nfs_client__mounts

List of NFS mounts to create. Subkeys:

  • src
  • path
  • opts
  • state
For details, have a look at the ansible.posix.mount_module.

unset

Example:

# optional
nfs_client__mounts:
  - src: 'nfs-server.example.com:/path/to/exported/data'
    path: '/mnt/nfs/data'
    opts: 'defaults'
    state: 'mounted'

Troubleshooting

mount.nfs: access denied by server while mounting: Run exportfs -rv on the NFS server and try again.

License

The Unlicense

Author Information

Linuxfabrik GmbH, Zurich