Files
Kamino/roles/nfs_client/defaults/main.yml
T
Dragonish 5ce5e3c932
Build / build (pull_request) Successful in 31s
Molecule / molecule (pull_request) Failing after 43s
Lint / lint (pull_request) Successful in 1m53s
feat(nfs_client): add a role that manages NFS client entries in fstab
Installs nfs-common and manages NFS mount entries from nfs_client_mounts
(src, path, optional opts, state present or absent). Each mount point is
created without owner, group or mode, because once a share is mounted a
chown or chmod there changes the permissions on the NFS server. The role
writes only the fstab line and reloads systemd; it never mounts or
unmounts. An absent entry maps to ansible.posix.mount's absent_from_fstab,
which removes the line and leaves the share and the directory alone.

The default options are _netdev,nofail. x-systemd.automount is left out.

Verified locally: yamllint, ansible-lint (production profile), syntax check
of the scenario playbooks, the controller-side refusals of verify.yml (14
cases, each matched on its own message), and the module's fstab behaviour
against a scratch fstab (replacement, absent_from_fstab, idempotence).
Not verified: Molecule, which runs only in CI; the apt install and the
daemon-reload handler; that systemd generates the mount units in the
scenario's containers.

Refs #402

Assisted-by: Claude Code
2026-11-27 21:47:09 +00:00

9 lines
430 B
YAML

---
# Each entry: src (server:/export) and path (absolute mount point) are required; opts falls back
# to nfs_client_default_opts; state is present (default) or absent.
nfs_client_mounts: []
# _netdev orders the mount after the network and puts it in remote-fs.target; nofail keeps an
# unreachable server from holding up the boot. x-systemd.automount is left to the host that wants it.
nfs_client_default_opts: "_netdev,nofail"