The culprit might be body classes satisfied as sshd_ready would be defined every time cfegnine runs. The body should look like the following to restart sshd when there is something changed. (promise_repaired not promise_kept)
body classes satisfied(x) { promise_repaired => { "$(x)" }; } Cheers, --Nakarin On Apr 2, 2010, at 2:23 PM, Patrick de Ruiter wrote: > Gent's > > I' currently got the following problem: > > Every time cfengine run's it restarts the ssh daemon even when nothing is > changed. > How do I change this behaviour? > > bundle agent sshd_config { > > files: > linux:: > # Copy the sshd server configuration file > "/etc/ssh/sshd_config" > handle => "update_policy", > perms => usystem("0644"), > classes => satisfied("sshd_ready"), > copy_from => > umycopy("$(g.masterfiles)/PROD/repl/root/etc/ssh/linux_sshd_config"); > > commands: > > # Restart sshd daemon when configuration changed > sshd_ready:: > "/etc/init.d/sshd restart"; > } > > Regards, > Patrick > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine