loomsen/puppet-rsnapshot

Cron.d files with dots are ignored on debian

laurigates opened this issue · 5 comments

Cron files under /etc/cron.d are silently ignored for hosts with dots in their name. This seems to be a debian/ubuntu specific issue.

Hi, thank you for reporting this. This is odd, indeed. I will gladly accept patches if you find a way around this :)

If I'm not mistaken, isn't fixing this as simple as replacing line 165 of config.pp (https://github.com/loomsen/puppet-rsnapshot/blob/master/manifests/config.pp#L165) with

    $cronfile = "${cron_dir}/puppet_rsnapshot"

Hi Nick,

thank you for your suggestion. Unfortunately, this won't work. line 165 is inside a loop, see line 38:
$hosts_clean.each |String $host, $hash | {

Where each host has its own cron file. doing like you suggest would result in only one file being written for the last host in question.

Oh, I'm sorry! Still rather new to puppet. Perhaps a dots-to-underscores transform, or similar, might work.

Hi Nick,

I guess that should work. Feel free to issue a pull request 👍