From 90f256fea0683804077c3cea7079ca0316b49140 Mon Sep 17 00:00:00 2001 From: Nick Chappell Date: Mon, 28 Jul 2014 21:05:39 -0700 Subject: [PATCH] Added a parameter and default value for the icon_image parameter; added it to the service object ERB template. --- manifests/object/service.pp | 2 +- templates/object_service.conf.erb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/manifests/object/service.pp b/manifests/object/service.pp index 133d633..da8fe66 100644 --- a/manifests/object/service.pp +++ b/manifests/object/service.pp @@ -34,8 +34,8 @@ define icinga2::object::service ( $notes = undef, $notes_url = undef, $action_url = undef, + $icon_image = undef, #Parameters to add: - # * icon_image # * icon_image_alt $target_dir = '/etc/icinga2/conf.d', $target_file_name = "${name}.conf", diff --git a/templates/object_service.conf.erb b/templates/object_service.conf.erb index b0517ad..4d068cb 100644 --- a/templates/object_service.conf.erb +++ b/templates/object_service.conf.erb @@ -11,7 +11,6 @@ */ // Parameters to add: -// * icon_image // * icon_image_alt object Service "<%= @object_servicename %>" { @@ -85,4 +84,7 @@ object Service "<%= @object_servicename %>" { <%- if @action_url -%> action_url = "<%= @action_url -%>" <%- end -%> + <%- if @icon_image -%> + icon_image = "<%= @icon_image -%>" + <%- end -%> } \ No newline at end of file