Hi all,

i try to run a puppet-setup that is not based on hostnames, but facts i supply 
to facter. The idea is described here 
https://github.com/jordansissel/puppet-examples/blob/master/nodeless-puppet/README.rdoc,
 but a basic example would be

----
if has_role("loadbalancer") {
      include loadbalancer::service
    } else {
      # Otherwise, this machine is not a loadbalancer
      include loadbalancer::remove
}
----   

How am i able to bring this together with parameterized classes? For instance 
this will complain about redefinition of class 'haproxy'.

---
class haproxy ($conf = "puppet:///modules/haproxy/proxy.conf") {
}

if has_role("loadbalancer") {
      class { 'haproxy': conf => "puppet://modules/haproxy/conf1" }
    } else {
      class { 'haproxy': conf => "puppet://modules/haproxy/conf2" }
}
---

How can i "import" parameterized classes? Is there a work-around?

I am quiet new to puppet, so if i missed the obvious or google keywords, please 
point me to the right direction.

Regards, Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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