Chef - repetitive recipe execution
-
29-10-2019 - |
Question
First off, can (and is it good practice) chef run a recipe at a specified interval on a specific role?
I've got a ruby script which manages user accounts and ssh identities, it currently runs on a cron every hour and I'd like to turn it into a Chef recipe for obvious reasons (I want it to be there on all machines).
I can see two ways of doing this:
Either turn the script into a template, the recipe would simply render the template to a given path and then register a cronjob
OR
Break the script into resources, providers, etc., and have Chef run it every hour.
Ideas?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow