On Wednesday, January 18, 2012 12:01:42 PM UTC+1, Ryan Bowlby wrote:
>
> Show off! ;) Great example thanks. 
>
> I noticed you fully qualify variables within the very class they were 
> assigned. Is that best practice now? 
>

Erm, dunno :-D
Still haven't understood what's best practice in Puppet world.
I think is somehow relative to Puppet version and personal approach to 
things.
In any case generally speaking I'd recommend to use fully qualified 
variables. 


> I've created a simple apache module using your openssh module as 
> inspiration. I still need to modify params.pp to check for globally 
> defined vars. In the current incarnation it optionally installs the 
> mod_ssl package if the "apache:ssl" class is declared (which inherits 
> the apache class). 


 

>  
>
Would you recommend doing optional packages as sub classes? Does it 
> make more sense to install optional packages based on class 
> parameters? 
>

Really, this is a matter of personal taste.
I'm going towards and approach with "rich" class parameters, so I probably 
would add the ssl stuff via a parameter to enable whe calling the apache 
class.
As a side note I noticed (not surprisingly) that when you have plenty of 
resources and classes compilation and reporting times grow and this is a 
problem on some scales, that's why in my new modules I'm trying to reduce 
the number of subclasses.
But, well, 2 years ago I was doing the opposite... 

Sorry for lack of definitive answers but I'm still exploring and trying to 
find out if the approach I use is usable and fitting for others.

my2c
al


> On Jan 18, 1:58 am, Alessandro Franceschi <a....@lab42.it> wrote: 
> > Look here at how I do this:https://github.com/example42/puppet-openssh

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/CiT-PdyT6TYJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to