Mohitsharma44.nfs-client
Role Name
NFS Client Role for Mounting NFS Server
Requirements
To test this setup, you need an NFS server that has shared
/var/nfs/general
with the following options:/var/nfs/general *(rw,insecure,no_subtree_check,no_root_squash)
Role Variables
nfs_shares
: A list of dictionaries with the following variables:
mnt_path
: The location to mount the NFS share on your local machine.remote_path
: The path of the remote NFS share.nfs_mount_opts
: A list of options for mounting the NFS share, separated by commas.
Dependencies
nfs-common
This package is installed by the role.
Example Playbook
- hosts: localhost
connection: local
gather_facts: no
become: yes
vars:
nfs_shares:
- mnt_path: /media/test_export
remote_path: 10.8.10.67:/var/nfs/general
nfs_mount_opts: auto,nofail,ro,noatime,nolock,intr,tcp,actimeo=1800
License
MIT
Author Information
Mohit Sharma (Mohitsharma44@gmail.com)