module

Beryl::CLI::Fmt

beryl fmt [host|société|domaine] [--check] : normalise les fichiers de config beryl — *.host.yml, _default.yml, *.domain.yml, _account.yml : clés triées alpha (récursif) ET éléments des listes en bloc (- …, yaml-tidy >= 0.1.5), commentaires préservés ; un *.host.yml reçoit en plus son FQDN en 1ʳᵉ ligne.

NE TOUCHE PAS aux secrets (.env*, *.sample). N'a PAS besoin du coffre : c'est de la lecture/écriture de fichiers, aucune résolution de config.

Constants

CONFIG_BASENAMES = {"_defaults.yml", "_default.yml", "_account.yml"}
CONFIG_SUFFIXES = {".host.yml", ".domain.yml"}
EXIT_OK = 0

Class methods

config_files(config_root : String) : Array(String)
Source
host_fqdn(path : String) : String | Nil

FQDN d'un *.host.yml (depuis le chemin : <short>.host.yml sous le dossier <domaine>/, ou sous <domaine>/<groupe>/ — un groupe n'a pas de point, un domaine en a un ; le groupe n'entre pas dans le FQDN). nil pour les fichiers structurels (pas d'en-tête FQDN).

Source
in_scope?(path : String, config_root : String, scope : String) : Bool

Le fichier est-il dans le périmètre (société / domaine / host court / fqdn) ?

Source
run(config_root : String, args : Array(String)) : Int32
Source
write(path : String, content : String) : Nil

Fichiers de config beryl sous config_root — PAS les secrets (.env*). Écrit un fichier de config beryl DÉJÀ rangé comme beryl fmt (clés triées alpha à tous les niveaux, FQDN en tête d'un host.yml) : toute commande qui écrit un host.yml, un _default.yml… passe par ici.

Source