Add information about /etc/os-release (#212)
This commit is contained in:
parent
545945c714
commit
1de83b4007
2 changed files with 8 additions and 2 deletions
|
@ -29,7 +29,7 @@ be omitted. Most attributes can be abbreviated as a single letter.
|
|||
| - | - |
|
||||
| `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 <code>id ‑u ‑n</code>. |
|
||||
| `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running <code>lsb_release ‑si</code>. |
|
||||
| `distro`, `d` | Valid if the value matches the distro. Distro is calculated by running <code>lsb_release ‑si</code> or inspecting <code>/etc/os-release</code> |
|
||||
| `os`, `o` | Valid if the value matches the OS. OS is calculated by running <code>uname ‑s</code>. <sup>*</sup> |
|
||||
| `class`, `c` | Valid if the value matches the local.class configuration. Class must be manually set using <code>yadm config local.class <class></code>. |
|
||||
|`hostname`, `h`|Valid if the value matches the short hostname. Hostname is calculated by running `hostname`, and trimming off any domain.|
|
||||
|
@ -37,6 +37,9 @@ be omitted. Most attributes can be abbreviated as a single letter.
|
|||
|
||||
<sub><sup>*
|
||||
The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux".
|
||||
<br/>
|
||||
*
|
||||
If `lsb_release` is not available, "distro" will be the ID specified in `/etc/os-release`.
|
||||
</sup></sub>
|
||||
|
||||
You may use any number of conditions, in any order. An alternate will only be
|
||||
|
|
|
@ -39,7 +39,7 @@ When template processors run, they will be provided the following set of data.
|
|||
| Default (built-in) | Jinja | Description | Source |
|
||||
| - | - | - | - |
|
||||
| `yadm.class` | `YADM_CLASS` | Locally defined yadm class | <code>yadm config local.class</code> |
|
||||
| `yadm.distro` | `YADM_DISTRO` | Distribution | <code>lsb_release ‑si</code> |
|
||||
| `yadm.distro` | `YADM_DISTRO` | Distribution | <code>lsb_release ‑si</code><br/>or <code>/etc/os-release</code> |
|
||||
| `yadm.hostname` | `YADM_HOSTNAME` | Hostname | `hostname` (without domain) |
|
||||
| `yadm.os` | `YADM_OS` | Operating system | <code>uname ‑s</code> <sup>*</sup> |
|
||||
| `yadm.user` | `YADM_USER` | Current user | <code>id ‑u ‑n</code> |
|
||||
|
@ -47,6 +47,9 @@ When template processors run, they will be provided the following set of data.
|
|||
|
||||
<sub><sup>*
|
||||
The OS for "Windows Subsystem for Linux" is reported as "WSL", even though uname identifies as "Linux".
|
||||
<br/>
|
||||
*
|
||||
If `lsb_release` is not available, "distro" will be the ID specified in `/etc/os-release`.
|
||||
</sup></sub>
|
||||
|
||||
## Supported template processors
|
||||
|
|
Loading…
Reference in a new issue