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
# Generates an list of gem install commands. Useful for moving to enterprise ruby. | |
existing_gems = %<actionmailer (2.0.2, 1.3.6) | |
actionpack (2.0.2, 1.13.6) | |
actionwebservice (1.2.6) | |
activerecord (2.0.2, 1.15.6) | |
activeresource (2.0.2) | |
activesupport (2.0.2, 1.4.4) | |
existing_gems.each do |line| |
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
# So imagine that you have an attribute mash named apache: | |
# apache = Mash.new unless attribute?("apache") | |
# | |
# And you'd like to prefer the values defined by the node over the defaults in your attributes file: | |
# apache[:version] = '2.0.6' unless apache.has_key?(:version) | |
# | |
# Now instead of having to check every key you can do something like this: | |
# apache Mash.new unless attribute?("apache") | |
# apache.prefer_defaults = false | |
# apache[:version] = '2.0.6' |
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
task :default => [:update_servers] | |
desc "Update servers with current config" | |
task :update_servers do | |
puts `scp lb1_keepalived.conf root@vm-ubuntu-1:/etc/keepalived/keepalived.conf` | |
puts `scp my.cnf root@vm-ubuntu-1:/etc/mysql/` | |
puts `scp ndb_mgmd.cnf root@vm-ubuntu-1:/etc/mysql/` | |
puts `scp lb2_keepalived.conf root@vm-ubuntu-2:/etc/keepalived/keepalived.conf` | |
puts `scp my.cnf root@vm-ubuntu-2:/etc/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
require 'rake' | |
require 'rake/tasklib' | |
class VirtualMachineTask < ::Rake::TaskLib | |
def initialize(vm_path, vm_name, snapshot_name) | |
@vm_path = vm_path | |
@vm_name = vm_name | |
@snapshot_name = snapshot_name | |
define |
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
'Chef::Mixin::Template render_template should return a file' FAILED | |
expected kind of Tempfile, got #<File:/var/folders/M6/M6md4-eIH04rJcQnz8aGL++++TI/-Tmp-/chef-rendered-template.41497.2 (closed)> | |
(eval):3:in `__send__' | |
(eval):3:in `should' | |
./spec/unit/mixin/template_spec.rb:35: |
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
1) | |
Spec::Mocks::MockExpectationError in 'Chef::Provider::Directory should load the current resource based on the new resource' | |
<File (class)> expected :exist? with (any args) once, but received it 11 times | |
./spec/unit/provider/directory_spec.rb:38: | |
2) | |
Spec::Mocks::MockExpectationError in 'Chef::Provider::Link load_current_resource when the link type is symbolic and the target exists and is a symlink should update the source of the existing link with the links target' | |
<File (class)> expected :exists? with ("/tmp/fofile-link") but received it with (["/tmp/fofile"]) | |
./spec/unit/provider/link_spec.rb:80: |