[Puppet Users] Re: inherits from parametrized class

2012-02-14 Thread Bill Proud
You can only inherit from a parameterised class if you provide defaults for all of the parameters (and then of course those are the values that are used). What you could do is just have a single class with something like a type parameter. Then your class would have something like: if $type == "lo

[Puppet Users] Re: inherits from parametrized class

2012-02-15 Thread jcbollinger
On Feb 14, 10:41 am, Nan Liu wrote: > On Tue, Feb 14, 2012 at 6:49 AM, ruslan usifov > wrote: > > Hello > > > In is possible inherits from parametrized class?? Is class inheritance really would you should be using? If your intention is for the child class to override properties of resources

[Puppet Users] Re: inherits from parametrized class

2012-02-17 Thread jcbollinger
On Feb 17, 3:48 am, ruslan usifov wrote: > 2012/2/15 jcbollinger > > > > > On Feb 14, 10:41 am, Nan Liu wrote: > > > On Tue, Feb 14, 2012 at 6:49 AM, ruslan usifov > > wrote: > > > > Hello > > > > > In is possible inherits from parametrized class?? > > > Is class inheritance really would you

[Puppet Users] Re: inherits from parametrized class

2012-02-22 Thread Bill Proud
I didn't realise that would work. Here's a trivial tested example derived from Felix's comment: class mod::class($param1, $param2) { file {"$param1/$param2": content => "Bla\n"} } class mod::class::sub1 inherits mod::class { File["$param1/$param2"] {content => "Sub1\n"} } And then in th

Re: [Puppet Users] Re: inherits from parametrized class

2012-02-17 Thread ruslan usifov
2012/2/15 jcbollinger > > > On Feb 14, 10:41 am, Nan Liu wrote: > > On Tue, Feb 14, 2012 at 6:49 AM, ruslan usifov > wrote: > > > Hello > > > > > In is possible inherits from parametrized class?? > > > Is class inheritance really would you should be using? If your > intention is for the child

Re: [Puppet Users] Re: inherits from parametrized class

2012-02-22 Thread Felix Frank
Hi all, On 02/17/2012 09:44 PM, jcbollinger wrote: >> ... >> >> service >> { >> "php-fpm": >> require => [ File["/usr/local/etc/php-fpm.conf"], Package["php52"], >> File["/var/log/php-fpm/"], File["/etc/init.d/php-fpm"] ]; >> >> } >> >> and in derived class i want for standalone(linux: