Skip to content
This repository was archived by the owner on Apr 16, 2018. It is now read-only.

Commit 55a3583

Browse files
committed
Fix the checkcommand template vars attribute handling
so the vars are written correctly into the CheckCommand object configuration. Before the fix the template produced the following CheckCommand object configruation for the vars attribute: vars += { vars.http_address = "$address$", vars.http_ssl = false, vars.http_sni = false } instead of the desired vars.http_address = "$address$", vars.http_ssl = false, vars.http_sni = false
1 parent c6f5b38 commit 55a3583

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,9 @@ icinga2::object::checkcommand { 'check_http':
640640
'"-e"' => '"$http_expect$"'
641641
},
642642
vars => {
643-
'vars.http_address' => '"$address$"',
644-
'vars.http_ssl' => 'false',
645-
'vars.http_sni' => 'false'
643+
http_address => '"$address$"',
644+
http_ssl => false,
645+
http_sni => false
646646
}
647647
}
648648
</pre>

templates/object/checkcommand.conf.erb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/**
32
* WARNING: This CheckCommand definition is automatically generated by Puppet.
43
* ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
@@ -25,7 +24,9 @@ object CheckCommand "<%= @object_checkcommandname %>" {
2524
<%- end -%>
2625
<%- if @vars.any? -%>
2726

28-
vars += <%= scope.function_icinga2_config_value([@vars]) %>
27+
<%- @vars.each do |key, val| -%>
28+
vars.<%= key -%> = <%= val %>
29+
<%- end -%>
2930
<%- end -%>
3031
<%- if @timeout -%>
3132

0 commit comments

Comments
 (0)