-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move default parameter values back to main class, hiera keeps exceptions
When I asked around about how folks were using hiera for default parameters, I was pointed to this discussion which is still unresolved: puppetlabs/puppet-strings#250 I also think that moving all default values to hiera makes it more complicated to figure out what's happening in most cases since it makes users of the module always need to open up at least two files to figure out what parameters and their default values are. It's way easier if the default values are right there in the code. Only the overrides should be in hiera. The downside of this approach is that knowing what gets overridden is rather hidden. Ppl need to remember to check within data/ if there's any relevant overrides for the platforms and releases that are relevant to them. In our case, the only param that's currently getting overridden is the jail.conf template path for RedHat. Otherwise all the rest in hiera is about values for creating default jails. The other argument that I think makes me think that having values in the class definition is better is that for defined types we can't use hiera at all, so all default values must be in the code. So in that sense pushing all default values for classes only creates an inconsistency and it makes reading and comprehending the code harder. Things are just easier if all code follows the same pattern/style.
- Loading branch information
Showing
2 changed files
with
46 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters