diff --git a/docs/label-templates-random.md b/docs/label-templates-random.md index 866c9c455..5a823c60f 100644 --- a/docs/label-templates-random.md +++ b/docs/label-templates-random.md @@ -13,6 +13,19 @@ They allow to include random `Int`, `Hex` or `UUID` values in custom [label temp The values are computed on the fly during the `label template variables` rendering. +:::info Random label templates are rendered only once + +A label template containing a Random variable is rendered only if the +[MachineInventory](machineinventory-reference) of the registering +host doesn't have a value for that label yet (a label with the same key is missing or its value is empty). + +So, the three cases in which a label template with a Random variable is rendered are: +1. the host is registering for the first time and the [MachineInventory](machineinventory-reference) is created anew +2. the label template has been added to the MachineRegistration after the host (re-)registered last time +3. the [MachineInventory](machineinventory-reference) label matching the label template (same label key) has been manually removed +or its value has been cleared out +::: + | Variable | Description | | ---------------------------------------- | --------------------------------------------------------------------- | | `${Random/UUID}` | random UUID (e.g., fd95324a-c26b-4e28-8727-1dcec293a0ec) |