I’m trying to have host templates that already come with host groups (things like linux, agent) but then add more groups to the host based on that template (server location etc.) all host groups from the template get replaced. Is there a way to just add to the host groups already there from the template?
log1c
September 10, 2021, 8:53am
2
This is a quite long lasting bug/feature request:
opened 07:41AM - 07 Jul 16 UTC
bug
This issue has been migrated from Redmine: https://dev.icinga.com/issues/12122
… **Created by spillerm on 2016-07-07 07:41:39 +00:00**
Assignee: _(none)_
Status: _New_
Target Version: _(none)_
Last Update: _2016-12-06 23:51:05 +00:00 (in Redmine)_
---
Hi,
I noticed the following: in Director, I created a host template "generic-cisco", preview of this template is:
@
template Host "generic-cisco" {
import "generic-switch-template"
groups = \[ "corporate", "network" \]
vars.is\_cisco = "true"
}
@
Now I would like to add a switch, so I create an object which imports generic-cisco; the field "groups" remains empty, and even when I'm looking at the "resolved" preview, my group assignment does not appear.
So at this point, inheritance does not seem to work.
Regards,
Marianne
---
**Relations**:
* relates [#13375](https://dev.icinga.com/issues/13375)
For now you will have to add all the groups manually.
Or you use the assign where statements at the host groups side, if that is possible for you.
1 Like