i have host names like countrycity-street.
I splitted this via mapping (i didn’t get regex to work) which was a real pain, but now it works.
Now i have to add values to each host depending on the street.
Hostname (for example): germanynuernberg-15deutschherrnstrasse are splitted to:
Now i want to add Coordinates for NagVis which i wanted to do with a template:
What i’m looking for is a assignement like this:
assign if host.vars.street = deutschherrnstrasse
I didn’t found any other way that put this values in templates and adding this thempates with a filter for each street. My sync-properties are 2 sites long.
I’m sure there is a better way to do this, but i didn’t finde one.
Could you help?