knife-block 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/chef/knife/block.rb +10 -7
- data/lib/knife-block/version.rb +1 -1
- metadata +3 -3
data/lib/chef/knife/block.rb
CHANGED
@@ -87,13 +87,16 @@ module GreenAndSecure
|
|
87
87
|
end
|
88
88
|
list = GreenAndSecure::BlockList.new
|
89
89
|
new_server = name_args.first
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
90
|
+
if File.exists?(::Chef::Knife::chef_config_dir+"/knife-#{new_server}.rb")
|
91
|
+
if File.exists?(::Chef::Knife::chef_config_dir+"/knife.rb")
|
92
|
+
File.unlink(::Chef::Knife::chef_config_dir+"/knife.rb")
|
93
|
+
end
|
94
|
+
File.symlink(::Chef::Knife::chef_config_dir+"/knife-#{new_server}.rb",
|
95
|
+
::Chef::Knife::chef_config_dir+"/knife.rb")
|
96
|
+
puts "The knife configuration has been updated to use #{new_server}"
|
97
|
+
else
|
98
|
+
puts "Knife configuration for #{new_server} not found, aborting switch"
|
99
|
+
end
|
97
100
|
end
|
98
101
|
end
|
99
102
|
|
data/lib/knife-block/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-block
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Create and manage knife.rb files for OpsCodes' Chef
|
15
15
|
email:
|
@@ -48,7 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
48
|
version: '0'
|
49
49
|
requirements: []
|
50
50
|
rubyforge_project:
|
51
|
-
rubygems_version: 1.8.
|
51
|
+
rubygems_version: 1.8.23
|
52
52
|
signing_key:
|
53
53
|
specification_version: 3
|
54
54
|
summary: Create and manage knife.rb files for OpsCodes' Chef
|