logo       

Re: Overrides and node classification (was: Template Nodes considered harmf: msg#00264

sysutils.puppet.user

Subject: Re: Overrides and node classification (was: Template Nodes considered harmful)

--On October 25, 2007 8:40:12 AM +0100 Derek.Whayman@xxxxxxxxxxxxxxxxxxx
wrote:

> The tricky bit is if I want a server which is customised so the "ntp"
> class is overridden for example. You can't override a resource defined
> in a class unless in a parent class (ref:
> http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial) - so I have
> to ditch the ntp class from my classification list and include a new
> class ntp_custom which inherits ntp.

Actually, you can include both the ntp and the ntp_custom. If you are
using overrides to revert the existence of ntp, then you'll be fine. To
demonstrate, try the following in puppet:

class test {
file { "/tmp/test": ensure => present }
}

class test2 inherits test {
File ["/tmp/test"] { ensure => absent }
}

include test, test2

--
Digant C Kasundra, Linux Tech Lead
Information Technology Services, Stanford University


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise