Hello, I have problem with my class when the archive is changed and the service is not restarted when i apply change and run the puppet agent, I have the next error:
[..............] * err: /Stage[main]/Spam_rule/Exec[zmamavisdctl]: Failed to call refresh: /opt/zimbra/bin/zmamavisdctl returned 1 instead of one of [0] at /etc/puppet/modules/spam_rule/manifests/init.pp:25* [..............] Note: The change that i written in the archive (* /etc/puppet//modules/spam_rule/99_rules.cf*) is applied to puppet agent the problem is only refresh (restart) to resource. My class is "spam_rule" (/etc/puppet/modules/spam_rule/manifests/init.pp) * * [..............]* * *class spam_rule {* * * *if $TypeSrv == "zimbra" {* * * *# global perms* *File {* * owner => zimbra,* * group => zimbra,* * mode => 644,* *}* * * *# create rule archive* *file { "/opt/zimbra/conf/spamassassin/99_rule.cf":* * ensure => file,* * source => "puppet:///modules/spam_rule/99_rules.cf",* * # notify => Exec["zmamavisdctl"],* *}* * * * * *# define the service to restart* *exec { "zmamavisdctl":* * refreshonly => true,* * command => "/opt/zimbra/bin/zmamavisdctl",* * subscribe => File["/opt/zimbra/conf/spamassassin/99_rules.cf"],* *}* * * *}* * * *else{* * * *# globals perms* *File {* * owner => mailcleaner,* * group => mailcleaner,* * mode => 644,* *}* * * *# create rules archive* *file { "/usr/mailcleaner/share/spamassassin/99_rules.cf":* * ensure => file,* * source => "puppet:///modules/spam_rule/99_rules.cf",* * }* * * *# service restart* *exec { "mailscanner":* * refreshonly => true,* * command => "/usr/mailcleaner/etc/init.d/mailscanner",* * subscribe => File["/usr/mailcleaner/share/spamassassin/99_rules.cf"],* *}* * * *}* * * *}* * * [..............]* * *My site.pp (/etc/puppet/manifests/)* * * [..............]* * * #all mailcleaner server * node /^mailcleaner.*$/ { $TypeSrv="mailcleaner" include spam_rule } node 'mail.example.com' { $TypeSrv="zimbra" include spam_rule } [..............] ¿Some suggestion? Thanks -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/xUq8Wgn7jPIJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.