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
| ### | |
| # Fragile, embedded, deeply tied | |
| ### | |
| <% search("foo").each do |n| -%> | |
| stuff with <%= n %> | |
| <% end %> | |
| ### | |
| # Less fragile, not embedded |
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
| ~ can't convert Fixnum into String - (TypeError) | |
| /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef.rb:40:in `glob_' | |
| /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef.rb:40:in `glob' | |
| /usr/lib/ruby/gems/1.8/gems/merb-core-1.0.9/lib/merb-core/controller/mixins/render.rb:129:in `inject' | |
| /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef.rb:40:in `each' | |
| /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef.rb:40:in `inject' | |
| /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef.rb:40:in `glob' | |
| /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook_loader.rb:138:in `load_cascading_files' | |
| /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook_loader.rb:76:in `load_cookbooks' | |
| /usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/cookbook_loader.rb:38:in `each' |
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
| [Thu, 20 Aug 2009 13:49:42 +0100] DEBUG: Converging node samizdat_is_betfair | |
| [Thu, 20 Aug 2009 13:49:42 +0100] DEBUG: Processing execute[c] | |
| [Thu, 20 Aug 2009 13:49:42 +0100] DEBUG: execute[c] using Chef::Provider::Execute | |
| [Thu, 20 Aug 2009 13:49:42 +0100] DEBUG: Doing nothing for execute[c] | |
| [Thu, 20 Aug 2009 13:49:42 +0100] DEBUG: Processing execute[b] | |
| [Thu, 20 Aug 2009 13:49:42 +0100] DEBUG: execute[b] using Chef::Provider::Execute | |
| [Thu, 20 Aug 2009 13:49:42 +0100] DEBUG: Doing nothing for execute[b] | |
| [Thu, 20 Aug 2009 13:49:42 +0100] DEBUG: Processing execute[a] | |
| [Thu, 20 Aug 2009 13:49:42 +0100] DEBUG: execute[a] using Chef::Provider::Execute | |
| [Thu, 20 Aug 2009 13:49:42 +0100] DEBUG: Executing echo hello! |
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
| Infrastructures (I hate this name): | |
| * Production | |
| * Cluster 1 | |
| - a | |
| x whiskey | |
| x tango | |
| x foxtrot | |
| * Cluster 2 | |
| - b | |
| * Staging |
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
| actions :create, :delete | |
| attribute :name, :kind_of => String, :name_attribute => true | |
| attribute :config_dir, :kind_of => String | |
| attribute :provider, :default => "tomcat6_application" |
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 'rubygems' | |
| require 'thor' | |
| require 'chef' | |
| require 'chef/node' | |
| require 'chef/rest' | |
| # Please see the readme for overview documentation. | |
| # |
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
| current_apt_keys = Dir[ | |
| File.expand_path(File.join(File.dirname(__FILE__), "..", "files", "default", "apt-keys", "*")) | |
| ] | |
| ruby_block "cleanup apt-keys" do | |
| block do | |
| Dir[ | |
| File.expand_path(File.join(Chef::Config[:file_cache_path], "cache", "apt_keys", "*")) | |
| ].each do |rf| | |
| unless current_apt_keys.include?(rf) |
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
| require 'rubygems' | |
| require 'sinatra' | |
| require 'redis' | |
| # To use, simply start your Redis server and boot this | |
| # example app with: | |
| # ruby example_note_keeping_app.rb | |
| # | |
| # Point your browser to http://localhost:4567 and enjoy! | |
| # |