Re: Overriding types?

Charlie Schluting
Fri, 22 Dec 2006 00:32:19 -0000

Well I thought I had it figured out; this is driving me a bit crazy now :)

Can you confirm that you cannot override things unless you actually
inherit, as opposed to including?

My real example looks something like this:

node A inherits solaris {
        include host_A
}
class host_A inherits solserver {
        remotefile { "/etc/group":
                mode => 644, group => other,
                source => "solall/etc/group.A"
        }
}
class solserver inherits server {
        remotefile { "/etc/group":
                mode => 644, group => other,
                source => "solall/etc/group.server"
        }
}
class server { } #Currently empty

With that I get:
 remotefile[/etc/group] is already defined in file
/etc/puppet/manifests/server.pp

... which is expected? I''m also trying to override something in the
solaris class, which is why I had my host_A class inherit solaris. But
I can''t also inherit/override something in solserver, huh?

Thanks,
 -Charlie