Skip to content

Instantly share code, notes, and snippets.

@chantra
Created August 31, 2014 10:39
Show Gist options
  • Save chantra/2dccb11798e3c365556f to your computer and use it in GitHub Desktop.
Save chantra/2dccb11798e3c365556f to your computer and use it in GitHub Desktop.
#!/bin/bash
CHEF_ROOT=/usr/local/chef
wget http://www.opscode.com/chef/install.sh -O - | bash
mkdir /etc/chef ${CHEF_ROOT}
cat <<EOF > /etc/chef/solo.rb
chef_root_path '${CHEF_ROOT}'
cookbook_path [chef_root_path + '/cookbooks', chef_root_path + '/site-cookbooks']
role_path chef_root_path + '/roles'
data_bag_path chef_root_path + '/data_bags'
json_attribs '/etc/chef/solo.json'
EOF
cat <<EOF > /etc/chef/solo.json
{
"run_list": [ "role[default]"]
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment