Files
computer-playbook/plugins/lookup/nfs_state_path.py
kevinveenbirkenbachandClaude Opus 4.8 8519642373 refactor(storage): SPOT the nfs export base and client version in their roles
storage.nfs shrinks to the deployment-specific server address: export_base moves into svc-storage-nfs-server's services.yml (the server dictates where exports root) and the mount protocol version into svc-storage-nfs-client's services.yml (the client owns how it mounts). Both are read through utils.storage.nfs loaders by the nfs lookups, the env handler and 00_topology, eliminating the unrendered-variables class for these values; the group_vars assert shrinks accordingly and the swarm test extras stop restating role defaults.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 23:54:32 +02:00

13 lines
375 B
Python

from __future__ import annotations
from ansible.plugins.lookup import LookupBase
from utils.storage.nfs import STATE_SUBDIR, get_export_base, state_path
class LookupModule(LookupBase):
"""Cluster-shared NFS state dir: {{ lookup('nfs_state_path') }}."""
def run(self, terms, variables=None, **kwargs):
return [state_path(get_export_base(), STATE_SUBDIR)]