Puppet模块的问题只包括一个子类,这似乎是在隐式包含父类
我无法弄清楚Puppet如何inheritance和自动包含模块。 我有一个Puppet类,当我testing“本地”,但当我通过Puppet服务器将其推送到我的节点失败时,按预期工作。 “本地”意味着通过puppet apply运行并发送正确的本地模块path。 这是一个类的例子,发生了什么。 我试图把这个问题解决到产生这个问题的最less的事情,但是我承认我并不积极地认为我可以省略一些重要的东西。 我想要实现的是为现有模块编写新组件,而不会破坏已经包含旧模块的节点的向后兼容性。 我正在将一个写得不好的模块迁移到一个更合适的写法,我想分阶段推出它,而不会破坏现有的安装。 我的节点声明如下: node /myserver.*/ { include myclass::server } 清单声明如下: # File "myclass/manifests/init.pp" class myclass { file { '/etc/oldconfig.conf': ensure => file, owner => root, group => root, mode => '0644', source => 'puppet:///files/oldconfig.conf', } } # File "myclass/manifests/server.pp" class myclass::server { include myclass::next } # File "myclass/manifests/next.pp" class […]