Skip to content

Instantly share code, notes, and snippets.

@bakins
bakins / gist:804922
Created January 31, 2011 22:02
brain dead data bags in chef solo
if Chef::Config[:solo]
class Chef
module Mixin
module Language
def data_bag(bag)
@solo_data_bags = {} if @solo_data_bags.nil?
unless @solo_data_bags[bag]
@solo_data_bags[bag] = {}
Dir.glob(File.join(Chef::Config[:data_bag_path], bag,
git "/var/lib/git/xxx" do
action :sync
repository "git://foo/xxx.git"
revision "master"
depth 1
end
template "/etc/something" do
local true
source "/var/lib/git/xxx/soemthing"
bash "build something" do
user "root"
cwd "/var/lib/git/something"
action :nothing
code <<-EOH
make clean || true
./buildconfig.sh || true
./configure --prefix=/usr/local/
./configure
make