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 == "local" with the configuration that is specific to this type. On Feb 14, 3:49 pm, ruslan usifov <[email protected]> wrote: > Hello > > In is possible inherits from parametrized class?? > > For example i have base php52 class like this: > > class linux::php52($pools, $extensions='') inherits linux > { > ...... > > } > > and whants to inherit it like this: > > class linux::php52::cluster inherits linux::php52 > > for cluster configuration (cluster stuff -f for example prevent php from > automatic startup), and > > class linux::php52::standalone inherits linux::php52 > > for standalone configuration(one host) > > I wants use this derrived classes like this: > > node "...." > { > ........ > > class > { > > "linux::php52::standalone": > pools => [ > { > "name" => "default", > "addr" => "10.54.178.200:1982", > "request_terminate_timeout" => 10, > "request_slowlog_timeout" => 5, > "workers" => 32 > } > ], > > extensions => ["apc", "json", "thrift-protocol", > "simplexml", "curl", "hash"]; > } > > ...... > > } > > But when i just write this class linux::php52::cluster inherits linux::php52 > > i got error: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Invalid parameter extensions > > How can i implement behavior that i want???? > > PS: puppet 2.7.10 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
