From 32384b9555d1c62c36e5d87224f401228fe711db Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Mon, 21 Feb 2022 13:13:16 -0600 Subject: [PATCH] Add details about supporting arch --- _docs/060_alternates.md | 6 ++++-- _docs/070_templates.md | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/_docs/060_alternates.md b/_docs/060_alternates.md index 0daf69c..4212d99 100644 --- a/_docs/060_alternates.md +++ b/_docs/060_alternates.md @@ -32,6 +32,7 @@ be omitted. Most attributes can be abbreviated as a single letter. | `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. | @@ -116,8 +117,9 @@ yadm configuration—with the `yadm config` command. The following sets the yadm config local.class Work -Similarly, the values of `os`, `hostname`, and `user` can be manually overridden -using the configuration options `local.os`, `local.hostname`, and `local.user`. +Similarly, the values of `arch`, `os`, `hostname`, and `user` can be manually +overridden using the configuration options `local.arch`, `local.os`, +`local.hostname`, and `local.user`. ## Templates diff --git a/_docs/070_templates.md b/_docs/070_templates.md index bb3d1f7..cb8c7df 100644 --- a/_docs/070_templates.md +++ b/_docs/070_templates.md @@ -45,6 +45,7 @@ When template processors run, they will be provided the following set of data. | `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) | | `env.VAR` | | Env variables | Any VAR in the environment while yadm templates are processed |