Jira (PDOC-292) Pull defaults from data directory

4 views
Skip to first unread message

Igor Galić

unread,
Oct 1, 2019, 11:01:03 AM10/1/19
to puppe...@googlegroups.com
Igor Galić created an issue
 
Puppet Strings / New Feature PDOC-292
Pull defaults from data directory
Issue Type: New Feature New Feature
Assignee: Unassigned
Created: 2019/10/01 8:00 AM
Priority: Normal Normal
Reporter: Igor Galić

I'm wondering if it would make sense to pull parameter defaults from a module's
data directory.

This would require to

  • either query the data using no facts, to ensure that these are platform agnostic defaults, or
  • query the data while iterating thru on_supported_platform and provide a list of defaults
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Ben Ford (JIRA)

unread,
Oct 1, 2019, 1:42:03 PM10/1/19
to puppe...@googlegroups.com
Ben Ford commented on New Feature PDOC-292
 
Re: Pull defaults from data directory

This would be incredibly useful. I can see the output getting VERY long though, especially if we iterate supported platforms. I wonder if this is worth another PARAMETER_DEFAULTS.md doc?

Henrik Lindberg (JIRA)

unread,
Oct 1, 2019, 2:24:03 PM10/1/19
to puppe...@googlegroups.com

Would also need to understand the hiera.yaml to ensure all is based on data files inside the module. When using hiera to obtain the values (could be using deep merges etc) it needs to evaluate puppet code - and puppet code can call functions so you would need to make sure it is safe to evaluate logic when generating documentation (which was a problem before PDOC as you needed to load the code to get the docs).

I think it would be better to have a separate tool that generates the default parameters part as data and that PDOC can make use of that when producing the docs. This way it is up to the publisher to run it in a safe manner whereas anyone else can generate docs without risking evaluating user code.

Reply all
Reply to author
Forward
0 new messages