mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
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>
23 lines
821 B
Python
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,
|
|
)
|