puppet 节点继承与类继承用法

puppet 节点继承用法:

node $name [inherits $parent_node]
{ [ Puppet code, resources and classes applied to the node ] }

puppet  node  inherits 用法示例:

node  'www.puppetfans.com' inherits basenode {}

puppet 类继承用法, puppet class inherits 用法示例:

class puppet {
file { '/etc/puppet/puppet.conf':
content => template('puppet/client/puppet.conf'),
}
}
class puppet::server inherits puppet {
File['/etc/puppet/puppet.conf'] {
content => template('puppet/server/puppet.conf'),
}
}