I'm pretty sure I'm coming at this from the wrong direction, if anybody 
could point me to what the puppet idiom should be here I'd really 
appreciate it.

I'd like to install two instances of this service on this host, with 
different parameters:

node /^memcache\d+.util.foo.com$/  { 
    class {'memcached': pool_index => 1, port => 11211 }
    class {'memcached': pool_index => 2, port => 11212 }  
}


The class itself uses the parameters something like this (abridged):

class memcached ($pool_index = undef, $port = 11211) {
    daemontools_service::s {
        memcached:
            service_name => "memcached${pool_index}",
            command      => "exec memcached -v -m 2048 -p ${port} "
    }
}


But the first part throws this error: *Duplicate declaration: 
Class[Memcached] is already declared in file...cannot redeclare.*

I was thinking a parameterized class was something you could call like a 
function, but apparently not.  What's the right way to set that up twice, 
with different parameters?

-- 
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/-/6vBVmFQ4V58J.
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.

Reply via email to