I want to use the value of a custom_var as the prefix of the diaplay_name (for Hosts and Services, let’s talk about Services first). At the time, i am able to do that using a “default-service” template and it works:
template Service "default-service" {
display_name = vars.prefix + "-" + name
}
The problem is when i change the value of the vars.prefix
custom_var, if i do (in another template that inherist this one or in the host) the value of the display_name
does not change. And i have vars.prefix
with a value and the display_name
with another value.
I am using Director for all the configuration of my Hosts and Services, I create a Service template that inherits the default-service
template. And that works, until i change the vars.prefix
value.
- Director version:
1.8.1
- Icinga Web 2 version and modules:
2.9.5
- Icinga 2 version:
r2.13.2-1
- Operating System and version:
Ubuntu 20.04.3 LTS
- Webserver, PHP versions:
7.4.3