This file contains hidden or 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
| @rmqver = '' | |
| ruby_block "get rabbit version" do | |
| block do | |
| @rmqver = %x[dpkg -l rabbitmq-server |grep "^ii" |awk "{print $3}"] | |
| @rmqver.sub!(/-\d*$/,'') | |
| end | |
| end | |
| directory "/usr/lib/rabbitmq/lib/rabbitmq_server-#{@rmqver}/plugins" do | |
| recursive true |
This file contains hidden or 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
| ruby_block "get rabbit version" do | |
| block do | |
| rmqver = '' | |
| out = %x[dpkg -l rabbitmq-server] # |grep "^ii" |awk "{print $3}"] | |
| out.split("\n").each do |line| | |
| if line =~ /^ii\s*[\w\-]*\s*([0-9\.]+)-\d*/ | |
| rmqver = $1 | |
| end | |
| end |
This file contains hidden or 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
| file "#{params[:home]}/.ssh/config" do | |
| owner params[:user] | |
| group params[:user] | |
| content <<-EOH | |
| Host github.com | |
| IdentityFile ~/.ssh/github | |
| IdentitiesOnly yes | |
| StrictHostKeyChecking no | |
| EOH | |
| end |
This file contains hidden or 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
| # force ohai to run and pick up new languages.java data | |
| ruby_block "reload_ohai" do | |
| block do | |
| o = Ohai::System.new | |
| o.all_plugins | |
| node.automatic_attrs.merge! o.data | |
| end | |
| action :nothing | |
| end |
This file contains hidden or 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
| execute "hostname --file /etc/hostname" do | |
| action :nothing | |
| end | |
| file "/etc/hostname" do | |
| content "#{new_hostname}" | |
| notifies :run, "execute[hostname --file /etc/hostname]", :immediately | |
| end |
This file contains hidden or 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
| https://labs.omniti.com/labs/reconnoiter/lists/users/2010-July/000467.html on display maths. | |
| https://labs.omniti.com/labs/reconnoiter/lists/users/2010-October/000543.html on getting esper going. | |
| https://labs.omniti.com/labs/reconnoiter/lists/users/2010-December/000583.html and thread | |
| http://blog.brosting.net/?p=10 general stuff | |
| http://www.control-alt-del.org/2011/10/31/monitoring-with-reconnoiter-part-deux/ | |
| http://www.ducea.com/2010/07/13/howto-install-reconnoiter-on-debian-lenny/ |
This file contains hidden or 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 'sinatra' | |
| require "sinatra/reloader" if development? | |
| require 'chef' | |
| require 'rack/flash' | |
| require 'haml' | |
| POSSIBLE = [('a'..'z'),('A'..'Z'),(0..9),'.','/'].inject([]) {|s,r| s+Array(r)} | |
| set :sessions, true |
This file contains hidden or 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
| template "/etc/snmp.conf" do | |
| if node.recipes.include? "haproxy" | |
| source "snmp-haproxy.conf.erb" | |
| else | |
| source "snmp.conf.erb" | |
| end | |
| end | |
This file contains hidden or 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
| define :npm, :user => "node", :home => "/srv/node" do | |
| file File.join(params[:home], ".npmrc") do | |
| content <<-EOH | |
| root = #{params[:home]}/.node_libraries | |
| binroot = #{params[:home]}/bin | |
| manroot = #{params[:home]}/share/man | |
| EOH | |
| owner params[:user] | |
| group params[:user] | |
| end |
This file contains hidden or 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
| r = gem_package "right_aws" do | |
| action :nothing | |
| end | |
| r.run_action(:install) | |
| require 'rubygems' | |
| Gem.clear_paths | |
| require 'right_aws' |