This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "deb ftp://mir1.ovh.net/debian/ sid main contrib non-free" > /etc/apt/sources.list | |
echo "deb-src ftp://mir1.ovh.net/debian/ sid main contrib non-free" >> /etc/apt/sources.list | |
apt-get update | |
apt-get install -y ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core rake liblibxml-ruby librspec-ruby zlib1g-dev libxml2-dev | |
gem sources -a http://gems.opscode.com | |
gem install jeweler merb-core cucumber uuidtools json libxml-ruby --no-ri --no-rdoc | |
mkdir ~/src | |
cd ~/src | |
git clone git://github.com/opscode/chef.git | |
git clone git://github.com/opscode/ohai.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
search(:users).each do |user| | |
puts "Found #{user.id}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service "slapd" do | |
supports :restart => true, :status => true | |
action [ :enable, :start ] | |
end | |
# ... some shit ... | |
unless node[:slapd][:some_shit_has_been_done] | |
service "slapd" do | |
action :stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get the war files from the git repo | |
branch = "release-12" | |
bash "name_git_repo" do | |
user "username" | |
cwd "path/to/repo" | |
code "git checkout -b #{branch}-#{DateTime.now} origin/#{branch}" | |
action :nothing | |
end |