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
We are currently working on puppet migration for icinga.
We came need to migrate service objects that specify both:
vars += config
vars.prio = 'high'
I tried some combinations but it seems that this is not possible yet using a proper icinga2::object::service. Would it be possible to make this work with an empty key in the hash? For example:
icinga2::object::service { 'ping4':
apply => 'ping => config in host.vars.ping',
target => '/etc/icinga2/conf.d/services.conf',
groups => ['system'],
vars => {
'' => 'vars + config',
'prio' => 'high',
'extra_info' => 'This check does a ping to the configured IP of the instance',
},
assign => [
'host.vars.os == Ubuntu',
]
}
At the moment this would generate:
vars. = vars + config
vars.prio = "high"
This is of course invalid syntax (there is a dot too much). But since it does not make much sense to use an empty hash key anyway I think an extra check in the parser can ensure that this becomes.
vars = vars + config
vars.prio = "high"
This way one can combine both constructions.
Your Environment
Module version (2.1.1):
Puppet version (6.4):
Operating System and version: ubuntu 18.04
The text was updated successfully, but these errors were encountered:
We are currently working on puppet migration for icinga.
We came need to migrate service objects that specify both:
I tried some combinations but it seems that this is not possible yet using a proper
icinga2::object::service
. Would it be possible to make this work with an empty key in the hash? For example:At the moment this would generate:
This is of course invalid syntax (there is a dot too much). But since it does not make much sense to use an empty hash key anyway I think an extra check in the parser can ensure that this becomes.
This way one can combine both constructions.
Your Environment
2.1.1
):6.4
):The text was updated successfully, but these errors were encountered: