我有两种人偶资源类型,一个文件和一个Exec:
file { 'folder_a':
source => 'puppet:///modules/folder_a',
ensure => 'directory',
recurse => true,
path => 'C:/folder_a',
source_permissions => ignore,
notify => Exec['install.bat'],
}
exec { 'test_cmd':
path => $::path,
command => 'cmd.exe /c C:/test.cmd',
provider => windows,
subscribe => File['folder_a'],
logoutput => true,
}
如果文件资源不适用,则我也不希望Exec资源运行。但是,如果源文件已更新,则Exec应该运行。
这可能吗?
答案 0 :(得分:1)