-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add service name to service apply loops #227
Comments
Actually, this one isn't fixed yet. You fixed the bug with using the variables in the service; but the template still needs to be updated to allow for a unique service name when the first loop variable (interface in the example) is the same for more than one service.
|
Sorry that's a syntax I donno. 'apply Service for' thru a hash is a for each loop (desc => config in host.vars.hash), desc is taken as service name by default. |
you can see it in the example here: Look at the example for In my example above it's necessary to add a prefix string as both services are iterating over the same hash, but add different services: one for ipv4 and one for ipv6. Without the prefix string icinga complains about duplicate service definition. |
It's not supported by the module. You can also omit the "if-" string, then all generated service names are directly taken from the if_name variable value. |
Hi,
When applying services by looping over a dict (and probably array as well) it seems that no service-name is prepended. I want to add two ping tests for each interface on a host; one over ipv4 and one over ipv6; but the result is the following two objects:
This fails since the service names will be the same for both checks (the interface name). What I really want is something like this:
Which would give all objects unique names; but it doesn't seem to be supported currently.
The text was updated successfully, but these errors were encountered: