On Sat, Jan 8, 2011 at 2:58 AM, Adam Nielsen <a.niel...@shikadi.net> wrote: > Hi all, > > I've got two classes. One installs and configures the web server lighttpd, > and the other installs and configures Mailman. > > Both these classes need to copy configuration files into the same directory, > but I can only get lighttpd's files copied in, Mailman's seem to be ignored. > > In my node's configuration file I have "include mailman", so the fact that > lighttpd's config files are copied means the inheritance is working, which > means it's something to do with the way I'm appending the additional source > line in the mailman class definition. > > What am I doing wrong?
It looks to me that you're going to end up with: source => ["puppet:///files/lighttpd/$hostname/", "puppet:///files/mailman/lighttpd/",] and the first one that exists will be used. I'm not sure you want to use plusignment in this case, don't you want to replace the original source with the new one? > > Many thanks, > Adam. > > > class lighttpd { > > file { > "/etc/lighttpd/conf-enabled": > source => "puppet:///files/lighttpd/$hostname/", > recurse => true, > ; > > "/etc/lighttpd/conf-enabled/10-accesslog.conf": > ensure => symlink, > target => "../conf-available/10-accesslog.conf", > ; > } > > package { "lighttpd": ensure => present } > > } > > class mailman inherits lighttpd { > file { > "/etc/mailman/mm_cfg.py": > source => "puppet:///files/mailman/mm_cfg.py", > owner => "root", > group => "root", > mode => 0644, > ; > > } > > File["/etc/lighttpd/conf-enabled"] { > source +> "puppet:///files/mailman/lighttpd/", > recurse => true, > require => Package["lighttpd"], > } > > package { "mailman": > ensure => present, > # Don't install until lighttpd is available or it will > # pull in Apache > require => Package["lighttpd"] > } > > } > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@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. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.