Closed reidmv closed 5 years ago
line #24 is now incorrect cos plans use .pp too (just a nitpick) but other than that what you’ve written follows what Gary last preached with the post on data and hiera abstraction. static defaults should be code not data, overrides for platforms (os etc) should be data so the module can be reused etc etc (https://puppet.com/blog/hiera-data-and-puppet-code-your-path-right-data-decisions)
I think like 24 is still fine because it explicitly says:
*.pp files containing classes or defined types
As far as I know, the plans/
directory contains plan foo(...) {...}
definitions and the functions/
directory contains function bar(...) {...}
definitions, but neither can contain class blah(...) {...}
or define blam(...) {...}
.
This seems relevant to the discussion from the puppet strings
point of view: https://tickets.puppetlabs.com/browse/PDOC-171
Personally, I really like having values in my documentation and in the Puppet Console. A field that just says "open the code" doesn't seem all that useful in general.
Proposal for addressing strings docs issue
See proposed change for details.
If we value
puppet strings
output for generating documentation, we need to address a shortcoming it has with regards to data-in-modules. This commit proposes a best practice that assumes the tooling as it exists today.Note that as an alternative, the tension/shortcoming could be resolved by an improvement to puppet-strings. Discuss!