Posts categorized under: linux

Chef Alternatives for Debian/Ubuntu

An update-alternatives script for chef. Currently only sets up a version installed in the 1.9.1 gems directory, but extendable to any version easily enough.

#!/bin/bash
RUBY_VERSION=1.9.1
CHEF_VERSION=0.10.8
GEM_ROOT=/var/lib/gems/${RUBY_VERSION}/gems/chef-${CHEF_VERSION}
update-alternatives \
   --install /usr/bin/chef-client chef ...