Add details about supporting arch

This commit is contained in:
Tim Byrne 2022-02-21 13:13:16 -06:00
parent 02677d576d
commit 32384b9555
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12
2 changed files with 5 additions and 2 deletions

View File

@ -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 <code>lsb_release&nbsp;&#8209;si</code> or inspecting <code>/etc/os-release</code> |
| `distro_family`, `f` | Valid if the value matches the distro family. Distro family is calculated by inspecting the `ID_LIKE` line from <code>/etc/os-release</code> |
| `os`, `o` | Valid if the value matches the OS. OS is calculated by running <code>uname&nbsp;&#8209;s</code>. <sup>*</sup> |
| `arch`, `architecture`, `a` | Valid if the value matches the architecture. Architecture is calculated by running <code>uname&nbsp;&#8209;m</code>. |
| `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using <code>yadm&nbsp;config&nbsp;local.class&nbsp;&lt;class&gt;</code>. |
| `hostname`, `h` | Valid if the value matches the short hostname. Hostname is calculated by running <code>uname&nbsp;&#8209;n</code>, 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

View File

@ -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<code>/etc/os&#8209;release</code> |
| `yadm.hostname` | `YADM_HOSTNAME` | Hostname | <code>uname&nbsp;&#8209;n</code> (without domain) |
| `yadm.os` | `YADM_OS` | Operating system | <code>uname&nbsp;&#8209;s</code> <sup>*</sup> |
| `yadm.arch` | `YADM_ARCH` | Architecture | <code>uname&nbsp;&#8209;m</code> |
| `yadm.user` | `YADM_USER` | Current user | <code>id&nbsp;&#8209;u&nbsp;&#8209;n</code> |
| `yadm.source` | `YADM_SOURCE` | Template filename | (fully qualified path) |
| `env.VAR` | | Env variables | Any VAR in the environment while yadm templates are processed |