Hi all,

I'm working with class inheritance and run into a problem with a node
including two child classes of the same parent class. The two child
classes use the plusignment operator to append to the 'subscrube'
metaparm of the same resource in the parent class.

The error is:

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Parameter 'subscribe' is already set on Service[httpd] by
#<Puppet::Resource::Type:0x983e8f8> at /etc/puppet/manifests/site.pp:
16; cannot redefine at /etc/puppet/manifests/site.pp:24 on node test

I kind of understand why it doesn't work, but is there a way to
achieve what I'm trying to do? I've tried playing with virtual
resources for service[httpd] but I can't get that to work either. This
is the site.pp:

#Master Puppet configuration file

class httpd {
  service { "httpd":
    enable      => true,
    ensure      => true,
    hasrestart  => true,
    hasstatus   => true,
  }
}

class httpd::ssl inherits httpd {
  package { "mod_ssl": ensure => present, }

  Service["httpd"] {
    subscribe +> Package["mod_ssl"],
  }
}

class httpd::svn inherits httpd {
  package { "mod_dav_svn": ensure => present, }

  Service["httpd"] {
    subscribe +> Package["mod_dav_svn"],
  }
}

node test {
  include httpd::ssl
  include httpd::svn
}

-- 
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.

Reply via email to