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
license_file_contents = NIL | |
if Chef::DataBag.list.key?('pmta_licenses') | |
Chef::Log.warn("Found pmta_licenses data bag...") | |
begin | |
license_file_contents = data_bag_item("pmta_licenses", node['hostname'])['license'] | |
Chef::Log.warn("found hostname license in data bag...") | |
file "/etc/pmta/license" do | |
owner 'pmta' | |
group 'pmta' | |
mode 0640 |
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
%w{ package1 package2 package3 }.each do |pkg| | |
package pkg do | |
action :install | |
end | |
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
cp ~/.profile ~/.profile.bak | |
echo 'export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"' > ~/.profile | |
. ~/.profile | |
echo 'Creating src directory' | |
mkdir ~/src | |
cd ~/src | |
echo 'Installing MySQL' | |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: cruisecontrol.rb | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: CruiseControl.rb | |
# Description: Continuous build integration system. This runs the web interface (via mongrel and the builders). | |
### END INIT INFO |
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
# In attribute file: | |
my_gem_packages = [ | |
"nokigiri", # Only a gem name, without a version requirement or other options" | |
["bundler", "=1.0.0"], # A gem with a version requirement | |
["rails", "~>2.3.9", "--no-ri --no-rdoc --source http://rubygems.org"], # A gem with a version requirement and options" | |
["json", nil, "--source http://rubygems.org"] # Gem with options but no version requirement | |
] | |
# In recipe: |
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
#!/usr/bin/env ruby | |
require "rubygems" | |
require "erb" | |
require "fileutils" | |
require "json" | |
require "net/ssh" | |
require "net/scp" | |
require "optparse" |
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
# from rsyslog::default.rb: | |
service "rsyslog" do | |
supports :restart => true, :reload => true | |
action [:enable, :start] | |
end | |
# from rsyslog/providers/imfile.rb: |
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
jzimmerman@ip-10-117-53-160:/etc/rsyslog.d$ sudo chef-client | |
[Wed, 26 Jan 2011 23:03:30 +0000] INFO: Starting Chef Run (Version 0.9.12) | |
[Wed, 26 Jan 2011 23:03:32 +0000] INFO: Writing updated content for template[/etc/rsyslog.d/nginx-main-error.conf] to /etc/rsyslog.d/nginx-main-error.conf | |
[Wed, 26 Jan 2011 23:03:32 +0000] INFO: template[/etc/rsyslog.d/nginx-main-error.conf] sending reload action to service[rsyslog] (delayed) | |
[Wed, 26 Jan 2011 23:03:32 +0000] ERROR: Running exception handlers | |
[Wed, 26 Jan 2011 23:03:32 +0000] ERROR: Exception handlers complete | |
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:53:in `run_action': undefined method `run_action' for "service[rsyslog]":String (NoMethodError) | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:101:in `converge' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:97:in `each' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/runner.rb:97:in `converge' |
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
######################################################################## | |
### NOTICE: this file managed by chef; changes made here will be lost. | |
######################################################################## | |
# ubuntu defaults, left here for compatibility | |
root ALL=(ALL) ALL | |
%admin ALL=(ALL) NOPASSWD:ALL | |
# Amazon EC2 ubuntu user - DO NOT REMOVE FROM EC2 NODES | |
# ubuntu user is default user in ec2-images. |
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
# This knife.rb orig. provided by jtimberman@opscode.com - but any mistakes are mine! | |
current_dir = File.dirname(__FILE__) | |
platform = "https://api.opscode.com/organizations" | |
require 'grit' | |
branch = Grit::Repo.new("#{current_dir}/..").head.name | |
case branch |
OlderNewer