The documentation for the source
attribute for the file
resource type说:
可用的URI方案是
puppet
和file
。puppet
URI将...
然后解释了puppet
URI方案,但没有说明file
URI方案。它是什么?将"file://foo/bar/baz"
分配给source
资源上的file
属性意味着什么?
答案 0 :(得分:2)
文件路径始终是绝对的。它指的是运行目录的系统上的文件。这是agent
系统,或您调用puppet apply
的计算机。
file {
'/etc/motd':
source => "file:///media/shared-storage0/motd/${fqdn}.motd";
}
例如,上述资源将使代理同步motd内容和文件元数据来自共享存储。
您可以省略file://
,只使用完整路径作为来源。
source => "/media/shared-storage0/motd/${fqdn}.motd";