voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.
https://forge.puppet.com/puppet/zabbix
Apache License 2.0
80 stars 228 forks source link

Default denykey to undef #813

Closed root-expert closed 2 years ago

root-expert commented 2 years ago

Pull Request (PR) description

Having a default value makes it impossible to undef the parameter, since undefing leads to the default value being used. As per zabbix's documentation this parameter is no mandatory, so undef as default value should be okay.

This Pull Request (PR) fixes the following issues

812

bastelfreak commented 2 years ago

This fails because of missing quotes here? https://github.com/voxpupuli/puppet-zabbix/blame/37f1a58645d97012ee7990becb600ec98bb2dc66/manifests/repo.pp#L121

root-expert commented 2 years ago

It fails on $facts['os'] but it seems that it's not specific as it fails on modules outside of it?

ekohl commented 2 years ago

For optional facts I'd always recommend fact(). So fact("os.distro.id.${id}"). Or dig(). That allows failing safely. Legacy facts don't have this problem since there is no nesting.

bastelfreak commented 2 years ago

I will fix the arch linux failures in another PR