我有一个默认节点,如下所示:
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 ... } }