考虑这两个Puppet模块文件:
# File modules/a/manifests/b/c.pp class a::b::c { include b::c } # File modules/b/manifests/c.pp class b::c { notify { "In b::c": } }
看来,当Puppet在类a::b::c碰到include b::c指令时,它通过从当前类向后查找来search对应的* .pp文件,并且决定它find位于的正确的文件../../b/c.pp 。 换句话说,它将b::cparsing为相同的* .pp文件,使得include b::c语句出现在: modules/a/manifests/b/c.pp
我期望它(并希望它),而不是find并加载文件modules/b/manifests/c.pp 有没有办法让木偶做到这一点? 如果没有,在我看来,模块名称中可能不包含任何其他模块名称,这是一个相当令人惊讶的限制。
强制它使用'include :: b :: c'