Ansible role for installing and configuring a NFS server
Find a file
Simon Cornet c9da2387d1
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
style: ignore line length for markdown tables
2026-05-15 13:44:00 +02:00
.woodpecker ci: migrate from gitlab-ci to woodpecker 2026-05-15 12:55:52 +02:00
defaults feat: initial commit 2026-04-07 16:26:05 +02:00
handlers feat: initial commit 2026-04-07 16:26:05 +02:00
meta feat: add meta 2026-04-07 16:53:44 +02:00
tasks feat: make nfs-kernel-server present not latest 2026-04-17 15:27:49 +02:00
templates feat: add whiteline between shares for readibility 2026-04-07 17:08:51 +02:00
.ansible-lint ci: sync ansible-lint config from common 2026-05-15 13:01:30 +02:00
.gitignore feat: initial commit 2026-04-07 16:26:05 +02:00
.markdownlint-cli2.jsonc style: ignore line length for markdown tables 2026-05-15 13:44:00 +02:00
.yamllint feat: initial commit 2026-04-07 16:26:05 +02:00
readme.md style(readme): align markdown tables 2026-05-15 13:04:18 +02:00
renovate.json feat: initial commit 2026-04-07 16:26:05 +02:00

Ansible Role: NFS Server

Install and configure an NFS server with customizable exports.

Variables

Variable Required Default Description
shares Yes [] List of NFS shares to export
shares[].name Yes - Description of the share
shares[].path Yes - Directory path to export
shares[].client_ip Yes - Client IP address or network
shares[].client_options Yes - NFS export options
shares[].owner No root Directory owner
shares[].group No root Directory group
shares[].mode No 0770 Directory permissions

Example

shares:

  # production data
  - name: "production data"
    path: "/srv/nfs/production"
    client_ip: "10.0.0.0/24"
    client_options: "rw,sync,no_subtree_check"
    owner: "nobody"
    group: "nogroup"
    mode: "0775"

  # backup storage
  - name: "backup storage"
    path: "/srv/nfs/backups"
    client_ip: "10.0.1.100"
    client_options: "rw,no_root_squash,no_subtree_check"
    owner: "backup"
    group: "backup"
    mode: "0700"