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

overwriting module params

pelacables opened this issue · comments

commented

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.X
  • Ruby: 2.5
  • Distribution: RH8
  • Module version: 9.2.0

How to reproduce (e.g Puppet code you use)

#Zabbix
zabbix::zabbix_version: 6.0

among other params in hiera.

What are you seeing

not all classes are reading the value defined in hiera.

What behaviour did you expect instead

My value of zabbix_version in all the classes.

Any additional information you'd like to impart

According to https://www.puppet.com/docs/puppet/6/lang_classes.html#lang_class_define-hiera-data-class-param-defaults
params.pp should be drop in favor of hiera.

If you are maintaining older modules, you might encounter cases where class parameter defaults are set with a parameter class, such as params.pp, and class inheritance. Update such modules to use Hiera data instead. Class inheritance can have unpredictable effects and makes troubleshooting difficult. For details about updating existing params classes to Hiera data, see data in modules.

you need to override $zabbix::params::zabbix_version because all class use it to customize version

That I tried already and does not work, neither.

can you post a manifest example of how you use the module?
and the distribution was RHEL8 o what derivate?

Ok, I've checked and you need to override version in all class because my suggestion wasn't applicable

Also

  "requirements": [
    {
      "name": "puppet",
      "version_requirement": ">= 7.0.0 < 9.0.0"
    }
  ],