我已经开始玩木偶5,由于某种原因,puppet file资源中的source属性不起作用。 我有一个简单的清单文件在我的木偶服务器,如下所示:
file {'/tmp/motd': source => '/tmp/motd', }
在代理上,我发出:
puppet agent -t
其中的错误为:
Error: /Stage[main]/Main/File[/tmp/motd]: Could not evaluate: Could not retrieve information from environment production source(s) file:/tmp/motd
motd文件存在于/tmp/目录中的puppet服务器上
任何想法可能会发生在这里?
如果我用content => 'Testing 1 2 3'replacesource属性, puppet agent -t运行成功创build一个目录,我看到客户端上的文件motd与内容Testing 1 2 3
source => '/tmp/motd'引用Puppet节点上的本地文件/tmp/motd作为源文件。 要从Puppet Master获取文件,请使用puppet:// URL。 默认情况下,所有Puppet模块的files目录都可以通过puppet:///modules/${module_name}/<filename> 。