jump to navigation

Run a single cookbook recipe with chef-solo November 25, 2009

Posted by John Dewey in Chef, Code, Example, Rake.
1 comment so far

I generally build my systems with chef-solo cookbooks. I do not want to maintain a central server for recipes. However, I’m getting to the point where I’d like to share my cookbooks from one solo project to another. Anyways, I
wanted to run an individual recipe of a given cookbook. The following gist allows for this. Although, it may not be necessary, since cookbooks are generally idempotent. Seemed like a good idea earlier in the evening, meh.


Adding environment variables to cron via whenever November 24, 2009

Posted by John Dewey in Crontab, Plugins & Gems.

I wanted my users’ cron to run under zsh, so it picks up the .zshenv — which contains additional environment variables, my rake task required.

Can add the following to schedule.rb. This will work with any ENVIRONMENT=variable.

### schedule.rb
env ‘SHELL’, ‘/usr/bin/zsh’