From 504b3bf2c90929a58ac5719fa419fb7150bb4b28 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Mon, 21 Feb 2022 13:17:16 -0600 Subject: [PATCH] Reorder lists --- _docs/060_alternates.md | 12 ++++++------ _docs/070_templates.md | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/_docs/060_alternates.md b/_docs/060_alternates.md index 4212d99..46ca52e 100644 --- a/_docs/060_alternates.md +++ b/_docs/060_alternates.md @@ -27,16 +27,16 @@ be omitted. Most attributes can be abbreviated as a single letter. | Attribute | Meaning | | - | - | -| `template`, `t` | Valid when the value matches a supported template processor. See the [Templates](/docs/templates) section for more details. | -| `user`, `u` | Valid if the value matches the current user. Current user is calculated by running id ‑u ‑n. | -| `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running lsb_release ‑si or inspecting /etc/os-release | -| `distro_family`, `f` | Valid if the value matches the distro family. Distro family is calculated by inspecting the `ID_LIKE` line from /etc/os-release | -| `os`, `o` | Valid if the value matches the OS. OS is calculated by running uname ‑s. * | | `arch`, `architecture`, `a` | Valid if the value matches the architecture. Architecture is calculated by running uname ‑m. | | `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using yadm config local.class <class>. | -| `hostname`, `h` | Valid if the value matches the short hostname. Hostname is calculated by running uname ‑n, and trimming off any domain. | | `default` | Valid when no other alternate is valid. | +| `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running lsb_release ‑si or inspecting /etc/os-release | +| `distro_family`, `f` | Valid if the value matches the distro family. Distro family is calculated by inspecting the `ID_LIKE` line from /etc/os-release | | `extension`, `e` | A special "condition" that doesn't affect the selection process. Its purpose is instead to allow the alternate file to end with a certain extension to e.g. make editors highlight the content properly. | +| `hostname`, `h` | Valid if the value matches the short hostname. Hostname is calculated by running uname ‑n, and trimming off any domain. | +| `os`, `o` | Valid if the value matches the OS. OS is calculated by running uname ‑s. * | +| `template`, `t` | Valid when the value matches a supported template processor. See the [Templates](/docs/templates) section for more details. | +| `user`, `u` | Valid if the value matches the current user. Current user is calculated by running id ‑u ‑n. | * The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux". diff --git a/_docs/070_templates.md b/_docs/070_templates.md index cb8c7df..3c8d8c7 100644 --- a/_docs/070_templates.md +++ b/_docs/070_templates.md @@ -39,15 +39,15 @@ When template processors run, they will be provided the following set of data. | Default (built-in) | Jinja or ESH | Description | Source | | - | - | - | - | +| `yadm.arch` | `YADM_ARCH` | Architecture | uname ‑m | | `yadm.class` | `YADM_CLASS` | Last defined class | yadm config local.class | | `yadm.classes` | `YADM_CLASSES` | All classes | yadm config ‑‑get‑all local.class | | `yadm.distro` | `YADM_DISTRO` | Distribution | lsb_release ‑si
or /etc/os-release | | `yadm.distro_family` | `YADM_DISTRO_FAMILY` | Distribution Family | `ID_LIKE` from/etc/os‑release | | `yadm.hostname` | `YADM_HOSTNAME` | Hostname | uname ‑n (without domain) | | `yadm.os` | `YADM_OS` | Operating system | uname ‑s * | -| `yadm.arch` | `YADM_ARCH` | Architecture | uname ‑m | -| `yadm.user` | `YADM_USER` | Current user | id ‑u ‑n | | `yadm.source` | `YADM_SOURCE` | Template filename | (fully qualified path) | +| `yadm.user` | `YADM_USER` | Current user | id ‑u ‑n | | `env.VAR` | | Env variables | Any VAR in the environment while yadm templates are processed | *