voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.

Home Page:https://forge.puppet.com/puppet/zabbix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

startup_script fails for windows

logicminds opened this issue · comments

This bug is caused due to a case sensitivity issue with the service name for windows. On windows the service name is capitalized while everything else it is lowercase. This causes the service to not start because the fail function is executed. A case insensitive comparison will fix this issue.

https://github.com/voxpupuli/puppet-zabbix/blob/master/manifests/startup.pp#L32

https://github.com/voxpupuli/puppet-zabbix/blob/master/manifests/params.pp#L103

What are you seeing

The catalog fails: we currently only support a title that contains agent or server

What behaviour did you expect instead

The catalog to complete sucessfully

Output log

Any additional information you'd like to impart

Puppet string comparison is not case sensitive, but repexp are. One can make them case insensitive but the syntax is not that readable, maybe better downcase the service name 😉