Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overwriting module params #870

Open
pelacables opened this issue Mar 29, 2023 · 6 comments
Open

overwriting module params #870

pelacables opened this issue Mar 29, 2023 · 6 comments

Comments

@pelacables
Copy link

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.

@Valantin
Copy link
Contributor

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

@Valantin Valantin added skip-changelog invalid This doesn't seem right labels Mar 18, 2024
@Valantin Valantin closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
@pelacables
Copy link
Author

That I tried already and does not work, neither.

@Valantin
Copy link
Contributor

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

@Valantin Valantin reopened this Mar 18, 2024
@Valantin
Copy link
Contributor

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

@Valantin Valantin removed skip-changelog invalid This doesn't seem right labels Mar 26, 2024
@TheMeier
Copy link
Contributor

Also

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

@pelacables
Copy link
Author

pelacables commented Mar 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants