The Director aims to be your new favourite Icinga config deployment tool. Director is designed for those who want to automate their configuration deployment and those who want to grant their “point & click” users easy access to the configuration.
apply Notification "update_checks_notification" to Service {
import "mail-notification-service"
period = "update_checks_period"
assign where "Update Checks" in service.groups
vars.customer_email = "{{ get_email_for_zone(service.host_name) }}"
}
I'm basically trying to get the function get_email_for_zone() to be evaluated. For our purposes, assume the function is defined as follows:
The customer_email variable keeps getting interpreted as a literal string, probably because of the quotation marks the director puts around it.
Possible Solution
Much like the macros functionality, the director should check for the presence of opening {{ and closing }} before deciding whether to use quotation marks or not.
Steps to Reproduce (for bugs)
Define a Notification apply rule for services (probably not limited to Notifications) and try to set a custom property as follows:
You should get a similar rendered config to the one shown above (Expected Behavior).
Your Environment
Director version (System - About): 1.6.0
Icinga Web 2 version and modules (System - About): 2.6.2
Expected Behavior
Consider the following rendered configuration:
I'm basically trying to get the function
get_email_for_zone()
to be evaluated. For our purposes, assume the function is defined as follows:Current Behavior
The
customer_email
variable keeps getting interpreted as a literal string, probably because of the quotation marks the director puts around it.Possible Solution
Much like the macros functionality, the director should check for the presence of opening
{{
and closing}}
before deciding whether to use quotation marks or not.Steps to Reproduce (for bugs)
Define a Notification apply rule for services (probably not limited to Notifications) and try to set a custom property as follows: You should get a similar rendered config to the one shown above (Expected Behavior).
Your Environment
icinga2 --version
): r2.10.3-1