Icinga / puppet-icinga2-legacy

(legacy) Puppet module for Icinga 2 (EOL)
GNU General Public License v2.0
55 stars 93 forks source link

Fix checkcommand manifest and template #193

Closed n00by closed 8 years ago

n00by commented 8 years ago

Update the validation of the parameters in the checkcommand manifest. Remove the obsolete "if" statement which prevents necessary parameter validations. The parameter "command" can either be an array or a string.

Fix the template. Make sure the "command" parameter is passed as an array to the "each_with_index" method, otherwise an exeption is thrown. If the "command" parameter consists of an array of individual command arguments, don't add the command path to each element of the array. This should only be done for the first element of the array (the command).

This fixes establish the desired behavior for the "command" parameter as described in the icinga2 docs.

Update the rspec tests.

arioch commented 8 years ago

Excellent! 👍 Merged upstream.