You probably want something like the following.  "restart_ssh" will only 
be activated as a class if the file needs to be copied.

files:

      "/etc/ssh/sshd_config"
          perms =>  mog("644", "root", "wheel"),
          copy_from =>          
secure_cp("$(g.masterfiles)/config/etc/ssh/sshd_config", "$(g.phost)"),
        classes_satisfied =>  "restart_ssh";

  commands:

        restart_ssh::
        "pkill -HUP sshd";


There is a sigmask inheritance caveat to having cf3 restart sshd on Linux which 
I'm mentioning just to make more noise about it.
https://cfengine.com/forum/read.php?3,19382,19385#msg-19385

Frans


_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to