Using puppet to manage incrontab

Puppet has the cron resource for managing the crontab, but is there a similar way of managing incrontab? I can find no writings anywhere regarding this, and to be fair, I'm extremely new to puppet (software dev helping out an overworked sysadmin).


There is no native support for incron but that doesn't mean you can't write a simple defined type that manages the tabs in /etc/incron.d. These would be just file resources for which Puppet has of course native support. Depending on your specific needs you could also make that defined type more complex by adding support for per-user incrontabs. These would probably require use of the Concat module.

But have a look at https://puppet.com/docs/puppet/latest/lang_defined_types.html first for more info on defined types. Could be that's all you need.


I've found a incron module at https://github.com/duritong/puppet-incron.

I have a pending pull request that adds a incron::watch defined type. It's working fine for me so far.