You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created by TheFlyingCorpse on 2016-12-12 22:29:59 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-12-12 22:29:59 +00:00 (in Redmine)
There is an issue when you use inherit from template on vars. In the template it is set as a string, while the apply rule removes the $'s and "'s before correctly setting them to the var.
^ error is there, it does not store the string the same way as the apply rule, in Director I store the string as $TestSnmpv2Community$, on the template its encapsulated, in the apply rule it is stored as a direct var without the $'s and "'s.
I just get it to say "vars.dummy_text = TestSnmpv2Community" on the template, I only get that on the apply rule.
service_apply.conf
apply Service "dummy" {
import "dummy"
assign where host.name == "ryglov09.labdomain.net"
}
apply Service "dummy3" {
import "dummy"
assign where host.name == "ryglov09.labdomain.net"
vars.dummy_text = TestSnmpv2Community
}
apply Service "dummy4" {
import "dummy"
assign where host.name == "ryglov09.labdomain.net"
vars.dummy_text = TestSnmpv3Community
}
Output if I dont modify is:
dummy: "OK: "
dummy3: "OK v2"
dummy4: "OK v3"
I expected dummy to return "OK: v2"
The text was updated successfully, but these errors were encountered:
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13541
Created by TheFlyingCorpse on 2016-12-12 22:29:59 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-12-12 22:29:59 +00:00 (in Redmine)
There is an issue when you use inherit from template on vars. In the template it is set as a string, while the apply rule removes the $'s and "'s before correctly setting them to the var.
Example:
constants.conf
service_templates.conf:
^ error is there, it does not store the string the same way as the apply rule, in Director I store the string as$TestSnmpv2Community$ , on the template its encapsulated, in the apply rule it is stored as a direct var without the $'s and "'s.
I just get it to say "vars.dummy_text = TestSnmpv2Community" on the template, I only get that on the apply rule.
service_apply.conf
Output if I dont modify is:
dummy: "OK: "
dummy3: "OK v2"
dummy4: "OK v3"
I expected dummy to return "OK: v2"
The text was updated successfully, but these errors were encountered: