Forum: CFEngine Help Subject: Re: Timing classes Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,22772,22775#msg-22775
I think I will refactor my promises code and intead of using approach like this bundle common g { classes: any:: "configure_sshd" expression => "any"; } bundle agent ssh_conf { files: configure_sshd:: "/etc/ssh/sshd_config" copy_from => ... classes => if_repaired("sshd_conf_changed"), action => if_elapsed("120"); commands: sshd_conf_changed:: "/usr/sbin/service sshd reload"; } bundle agent check_services { methods: configure_sshd:: "check_sshd" usebundle => verify_service("sshd"), action => if_elapsed("120"); } I thought that approach more like this bundle common g { classes: any:: "configure_ssh" expression => "any", action => if_elapsed("120"); # REPLACE THIS } bundle agent ssh_conf { files: configure_ssh:: "/etc/ssh/sshd_config" copy_from => ... classes => if_repaired("sshd_conf_changed"); commands: sshd_conf_changed:: "/usr/sbin/service sshd reload"; } bundle agent check_services { methods: configure_sshd:: "check_sshd" usebundle => verify_service("sshd"); } would be nice. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine