好的,我已经在 Puppet 上工作了 12 个月,我正在部署清单来安装“aide”包,但我看不到任何选项可以在安装包后触发“aide”的“初始化”。在“package”指令中没有“notify”函数。我该如何让它工作?
答案1
该notify
参数是元参数,可应用于任何资源。来源:
https://puppet.com/docs/puppet/5.5/lang_relationships.html#refreshing-and-notification https://puppet.com/docs/puppet/5.5/metaparameter.html
通常,顺序如下:
class myclass {
package { 'myapp':
ensure => present,
}
file { '/etc/myapp.conf':
ensure => file,
...
notify => Service['myapp'],
require => Package['myapp'],
}
service { 'myapp':
ensure => running,
enable => true,
}
}