Files
computer-playbook/plugins/lookup/nfs_flavor.py
kevinveenbirkenbachandClaude Opus 5 a35f0a02a2 docs(svc-storage-nfs-server): correct the stale flavor description
Both iteration guides and the nfs_flavor lookup docstring still described
the flavor as RUNTIME conditional, selecting ganesha only for dev and act
and kernel everywhere else. Since the per-variant switching was dropped,
meta/services.yml pins ganesha for every runtime and kernel is a
per-inventory override.

State that, name meta/services.yml as the single point of truth, and
record which os families ship ganesha.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 23:25:49 +02:00

23 lines
821 B
Python

from __future__ import annotations
from ansible.plugins.loader import lookup_loader
from ansible.plugins.lookup import LookupBase
class LookupModule(LookupBase):
"""Resolved svc-storage-nfs-server flavor (kernel/ganesha): {{ lookup('nfs_flavor') }}.
Reads the merged-config SPOT through lookup('config'); the flavor itself is
declared in svc-storage-nfs-server/meta/services.yml.
"""
def run(self, terms, variables=None, **kwargs):
variables = variables or getattr(self._templar, "available_variables", {}) or {}
config_lookup = lookup_loader.get(
"config", loader=self._loader, templar=self._templar
)
return config_lookup.run(
["svc-storage-nfs-server", "services.nfs-server.flavor", "kernel"],
variables=variables,
)