I want to to ensure a file, and if the content changes a subscribed exec should fire.
file { "/etc/opt/microsoft/scx/ssl/scx-host-$fqdn.pem":
checksum => "md5",
}
exec { "/etc/init.d/scx-cimd restart":
subscribe => File["/etc/opt/microsoft/scx/ssl/scx-host-$fqdn.pem"],
refreshonly => true
}
The file is created by a package (scom) and the content isn't managed by puppet. I noticed that the exec never fired - I tried making a change to the file and running puppet, though it doesn't seem like puppet looking at the md5sum of the file at all.
tl;dr - I want to watch the md5sum of a file and not manage the content, if md5sum changes, fire an exec.