Skip to content

morbidick/ansible-role-nfs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: NFS

Build Status

Installs NFS utilities on RedHat/CentOS or Debian/Ubuntu.

Example Playbook

- hosts: db-servers
  roles:
    - morbidick.nfs
  vars:
    - nfs_exports:
      - name: "share"
        path: "/srv/share"
        writable: yes

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

nfs_exports: []

A list of exports which will be placed in the /etc/exports file. See Ubuntu's simple Network File System (NFS) guide for more info and examples. (Simple example: nfs_exports: { name: "/home/public" }).

A complete overview of export options follows below. Only path is required, the rest is optional.

Option Default Comment
name - The name/comment
subnet * The subnet you want to export to
writable false The share cannot be written
insecure false Requests don't have to originate from a port less than IPPORT_RESERVED (1024)
async false Replies to requests before the data is written to disk. This improves performance, but results in lost data if the server goes down
no_subtree_check false Deactivates that every file request is checked to make sure that the requested file is in an exported subdirectory
no_root_squash false Don't convert incoming requests from user root to the anonymous uid and gid
all_squash false Convert incoming requests, from ALL users, to the anonymous uid and gid
anonuid - Set anonymous user id to a specific id
anongid - Set anonymous group id to a specific id

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, author of Ansible for DevOps.

And forked by morbidick.