chef-metal 0.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b55bda561c7c8ea4e4ee5634ad368dfb2c42f6ef
|
4
|
+
data.tar.gz: 03c66248dee33dc38e0c314fef3ea97ec6842212
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b235456d07ee75d0c30ee8f0b1686d54113d7c936ac057af916238ffc6c9abd4d137dababe6d394a4b017934ad46ceb8d2575f73bf8622ea2a977c7e0304041c
|
7
|
+
data.tar.gz: 509f41552724c0cdaeb3e8213fa2ae4ac6a7a6b07e308ebe5bf535f4a02ca0003683ec3236d6d98d43fed4243e9c4df7b135a9c5179776f5ef56a77857a4368e
|
@@ -16,7 +16,7 @@ module ChefMetal
|
|
16
16
|
@package_cache = {}
|
17
17
|
@tmp_dir = '/tmp'
|
18
18
|
FileUtils.mkdir_p(@package_cache_path)
|
19
|
-
@
|
19
|
+
@package_cache_lock = Mutex.new
|
20
20
|
end
|
21
21
|
|
22
22
|
def setup_convergence(provider, machine, machine_resource)
|
@@ -78,15 +78,22 @@ module ChefMetal
|
|
78
78
|
metadata_url << "&p=#{platform}"
|
79
79
|
metadata_url << "&pv=#{platform_version}"
|
80
80
|
metadata_url << "&m=#{machine_architecture}"
|
81
|
+
use_ssl = true
|
81
82
|
|
82
83
|
# solaris 9 lacks openssl, solaris 10 lacks recent enough credentials - your base O/S is completely insecure, please upgrade
|
83
84
|
if platform == 'solaris2' && (platform_version == '5.9' || platform_version == '5.10')
|
84
85
|
metadata_url.sub(/^https/, 'http')
|
86
|
+
use_ssl = false
|
85
87
|
end
|
86
88
|
|
87
89
|
# Download and parse the metadata
|
88
90
|
Chef::Log.debug("Getting metadata for machine #{machine.node['name']}: #{metadata_url}")
|
89
|
-
|
91
|
+
uri = URI(metadata_url)
|
92
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
93
|
+
http.use_ssl = use_ssl
|
94
|
+
request = Net::HTTP::Get.new(uri.request_uri)
|
95
|
+
response = http.request(request)
|
96
|
+
metadata_str = response.body
|
90
97
|
metadata = {}
|
91
98
|
metadata_str.each_line do |line|
|
92
99
|
key, value = line.split("\t", 2)
|
@@ -274,7 +274,7 @@ module ChefMetal
|
|
274
274
|
end
|
275
275
|
|
276
276
|
def symbolize_keys(options)
|
277
|
-
options.inject({}) { |result,key,value| result[key.to_sym] = value; result }
|
277
|
+
options.inject({}) { |result,(key,value)| result[key.to_sym] = value; result }
|
278
278
|
end
|
279
279
|
|
280
280
|
def server_for(node)
|
data/lib/chef_metal/version.rb
CHANGED