linux – 在Puppet中,指定一对类是互斥的最佳方法是什么?

我有一个认节点,如下所示:
node default {
    include test_server
    # A bunch of other irrlevant includes
}

然后我有一个像这样的节点规范:

node linus inherit default {
    include production_server
}

我想取消包含test_server并拥有production_server,因为它们是互斥的.

我该如何做到这一点?

解决方法

最好创建一个名为“servertype”的类,并根据参数进行区分.
class servertype($testing = false) {
  if ($testing) {
     ... resources from your testing class ...
  } else {
     ... resources from your production class ...
  }
}

相关文章

1、安装Apache。 1)执行如下命令,安装Apache服务及其扩展包...
一、先说一下用ansible批量采集机器信息的实现办法: 1、先把...
安装配置 1. 安装vsftpd 检查是否安装了vsftpd # rpm -qa | ...
如何抑制stable_secret读取关键的“net.ipv6.conf.all.stabl...
1 删除0字节文件 find -type f -size 0 -exec rm -rf {} ...
## 步骤 1:安装必要的软件包 首先,需要确保系统已安装 `dh...