In regard to: Re: [Puppet Users] class parameters that depend on other...:
On Tuesday, June 12, 2018 at 3:14:45 PM UTC-5, Tim.Mooney wrote:
Let's say you had *many* parameters that you wanted to set defaults for
(but allow overrides on an individual basis) based on a single parameter.
The simplest and most straightforward alternative I can think of is simply
to reposition your classes. What I mean by that is instead of using a
params class to set Puppet-level default parameter values, make the target
class a wrapper that handles parameter defaults and adjustments, and passes
them off to a private, internal class. Truly, the internal class part is
optional, but it provides for a separation of concerns, and maps more
cleanly onto your example.
Thanks much John for your excellent reply! Between your suggestions
and Henrik's, I have a much clearer picture of how I can modernize and
hopefully simplify several of our home-grown modules and classes. The
time you took to read and reply is greatly appreciated.
Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing & Infrastructure 701-231-1076 (Voice)
Room 242-J6, Quentin Burdick Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/alpine.SOC.2.20.1806131439180.10996%40dogbert.cc.ndsu.NoDak.edu.
For more options, visit https://groups.google.com/d/optout.