我的木偶清单中有以下文件资源:
file{
'example.dat'
path => "/path/to/example.dat",
owner => devops,
mode => "0644",
source => "/path/to/example.txt"
}
我想仅当
.txt
文件存在于特定目录中时才运行上面的代码片段。否则,我不想运行该代码片段。
我该如何在木偶中做到这一点?
find_file()
在 Puppet 服务器上运行,而不是在代理上运行。