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

move defaults to class so that puppet-strings can build better docs #265

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

b4ldr
Copy link
Member

@b4ldr b4ldr commented Apr 20, 2021

Pull Request (PR) description

  • I also updated the defaults for arrays to []
  • I also updated the defaults for hash to {}
  • Add some types to make init.pp a bit more readable

This Pull Request (PR) fixes the following issues

Currently puppet-strings is unable to read defaults from hiera as such move the defaults back to init.pp

* I also updated the defaults for arrays to []
* I also updated the defaults for hash to {}
* Add some types to make init.pp a bit more readable
@b4ldr
Copy link
Member Author

b4ldr commented Apr 21, 2021

Do be honest i don't really like this patch, I think that puppet-strings should be able to read defaults from hiera, Ideally displaying the default for the various OS's. As the puppet labs style guide suggests one put defaults in hiera i would even go so far as to call it a bug.

further by puppet defaults in the class manifest it prevents you from doing things like (see diffs for real example)

common.yaml
unbound::service_name: unbound
unbound::restart_cmd: "systemctl restart %{lookup('unbound::service_name')}"
OpenBSD.yaml (i.e. we dont need to redefine service_name)
unbound::restart_cmd: "service restart %{lookup('unbound::service_name')}"

@bastelfreak
Copy link
Member

I would also b e happy with puppet-strings could do that. I pinged in puppetlabs/puppet-strings#250 again

@bastelfreak bastelfreak merged commit a5a6325 into voxpupuli:master Apr 26, 2021
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

Successfully merging this pull request may close these issues.

2 participants