Chef cookbook to setup chef-client as a periodic cron job.
- Chef 11 or higher
- Ruby 1.8.7 or higher
- The cron cookbook: https://github.com/opscode-cookbooks/cron
Key | Type | Description | Default |
---|---|---|---|
['chef_client']['bin'] | String | The chef-client executable to be run by the cron job | /usr/local/bin/chef-client |
['chef_client']['sleep_time'] | Integer | Seconds to sleep before running chef-client. If nil it will be a random value | nil |
['chef_client']['log_dir'] | String | Directory where the chef-client log will be stored | /var/log/chef-client |
['chef_client']['log_file'] | String | The chef-client log path. By default relative to the log_dir attribute value | /var/log/chef-client/chef-client.log |
['chef_client']['cron']['minute'] | String | The minute argument for the cron job | */30 |
['chef_client']['cron']['hour'] | String | The hour argument for the cron job | * |
Just include chef_client
in your node's run_list
:
{
"name":"my_node",
"run_list": [
"recipe[chef_client]"
]
}