Ansible role for installing and configuring the NFS client
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Simon Cornet ef2012859b
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
fix: exclude only sops yml files from lint
2026-07-14 16:23:46 +02:00
.woodpecker chore(package): update cr.simoncor.net/dockerhub/davidanson/markdownlint-cli2 docker tag to v0.23.0 2026-07-01 07:32:26 +00:00
meta feat: add meta 2026-04-07 16:53:50 +02:00
tasks chore: migrate bare ansible_* facts to ansible_facts[] syntax 2026-05-19 09:19:05 +02:00
templates/systemd feat: initial commit 2026-04-07 16:43:41 +02:00
.ansible-lint fix: exclude only sops yml files from lint 2026-07-14 16:23:46 +02:00
.editorconfig chore: add .editorconfig and .gitattributes 2026-05-27 14:23:51 +02:00
.gitattributes chore: add .editorconfig and .gitattributes 2026-05-27 14:23:51 +02:00
.gitignore feat: initial commit 2026-04-07 16:43:41 +02:00
.markdownlint-cli2.jsonc style: ignore line length for markdown tables 2026-05-15 13:44:01 +02:00
.sops.yaml fix: correct sops regex to ya?ml 2026-07-14 16:01:53 +02:00
.yamllint chore: exclude .yml files from lint configs 2026-07-14 16:17:29 +02:00
ansible.cfg chore: sync linting and config files from common 2026-07-14 11:33:15 +02:00
readme.md style(readme): align markdown tables 2026-05-15 13:04:17 +02:00
renovate.json feat: initial commit 2026-04-07 16:43:41 +02:00

Ansible Role: NFS Client

Install and configure NFS client with systemd-managed mounts.

Variables

Variable Required Default Description
nfs_mount Yes [] List of NFS mounts to configure
nfs_mount[].nfs_host Yes - NFS server hostname or IP
nfs_mount[].nfs_dir Yes - Remote directory path on NFS server
nfs_mount[].local_dir_path Yes - Local mount point path
nfs_mount[].nfs_opts Yes - NFS mount options
nfs_mount[].nfs_fstype No nfs4 NFS filesystem type
nfs_mount[].local_dir_owner No root Local directory owner
nfs_mount[].local_dir_group No root Local directory group
nfs_mount[].local_dir_mode No 0775 Local directory permissions
nfs_mount[].before_service No - List of systemd services to start after mount

Example

nfs_mount:

  # production share
  - nfs_host: "10.0.0.10"
    nfs_dir: "/srv/nfs/production"
    local_dir_path: "/mnt/production"
    nfs_opts: "rw,hard,intr,rsize=8192,wsize=8192"
    nfs_fstype: "nfs4"
    local_dir_owner: "www-data"
    local_dir_group: "www-data"
    local_dir_mode: "0755"
    before_service:
      - "nginx.service"
      - "php-fpm.service"

  # backup share
  - nfs_host: "nfs.example.com"
    nfs_dir: "/exports/backups"
    local_dir_path: "/mnt/backups"
    nfs_opts: "ro,soft,timeo=30"