【发布时间】:2013-12-04 17:41:57
【问题描述】:
我正在使用 Puppet 来管理我的 CentOS 服务器。
每个服务器都继承自节点“common”:
node 'common' {
class { 'ssh:server':
permit_root_login => no,
}
#[...] Other useful classes I want to keep
}
node default inherits 'common' {}
我想保留有用的“通用”节点,但只为一台服务器覆盖 SSH 部分:
node 'host.domain.com' inherits 'common' {
class { 'ssh:server':
permit_root_login => yes,
}
}
显然,这是行不通的。我怎样才能正确地做到这一点?
【问题讨论】:
标签: class inheritance overriding puppet