Added functionality to build full region and site_group paths to be used in hostgroup names.

This commit is contained in:
Raymond Kuiper
2024-03-25 11:49:41 +01:00
parent b94a0df02d
commit 71f604a6f6
3 changed files with 953 additions and 902 deletions

View File

@@ -119,6 +119,11 @@ You can specify the value like so, sperated by a "/":
```
hostgroup_format = "tenant/site/dev_location/dev_role"
```
** Group traversal **
The default behaviour for `region` is to only use the directly assigned region in the rendered hostgroup name.
However, by setting `traverse_region` to `True` in `config.py` the script will render a full region path of all parent regions for the hostgroup name.
`traverse_site_groups` controls the same behaviour for site_groups.
**custom fields**
You can also use the value of custom fields under the device object.