fix: bug in check command template
This commit is contained in:
parent
4915f4792d
commit
b3bc69a025
2 changed files with 7 additions and 3 deletions
|
@ -11,6 +11,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|||
|
||||
### Fixed
|
||||
|
||||
- bug in check command template
|
||||
- bug in user template
|
||||
- add multiple value type in service vars
|
||||
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
{% for name, command in icinga2_check_commands.items() %}
|
||||
|
||||
object CheckCommand "{{ name }}" {
|
||||
{% if command is not string %}
|
||||
command = ["{{ command.command | join('", "') }}"]
|
||||
{% else %}
|
||||
command = {{ command.command }}
|
||||
|
||||
{% endif %}
|
||||
{% if command.arguments is defined %}
|
||||
|
||||
arguments = {
|
||||
|
@ -26,7 +29,7 @@ object CheckCommand "{{ name }}" {
|
|||
{% endif %}
|
||||
{% if command.vars is defined %}
|
||||
|
||||
var = {
|
||||
vars = {
|
||||
{% for var, value in command.vars.items() %}
|
||||
{{ var }} = {% if value is number %}{{ value }}{% else %}"{{ value }}"{% endif %}
|
||||
|
||||
|
@ -62,7 +65,7 @@ object EventCommand "{{ name }}" {
|
|||
{% endif %}
|
||||
{% if command.vars is defined %}
|
||||
|
||||
var = {
|
||||
vars = {
|
||||
{% for var, value in command.vars.items() %}
|
||||
{{ var }} = {% if value is number %}{{ value }}{% else %}"{{ value }}"{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue