sambot 0.1.167 → 0.1.168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sambot/chef/cookbook.rb +4 -0
- data/lib/sambot/chef/kitchen.rb +4 -0
- data/lib/sambot/fs.rb +5 -6
- data/lib/sambot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dc79c816e4e644b829ff187cafa9e9c9ee67216
|
4
|
+
data.tar.gz: 5ea749a5c78155c1e28098dae9bd6a27628d48a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3487a874e155702112ef987d98fb4056daec228b3c5cd9cb9c67cf6f741f3bd6002ab16b3b1f262ca7035eeff7941ed9812e85c17536f028ae823894fa6388a
|
7
|
+
data.tar.gz: 1914e268627e4d65285b387c15910599702f2fdbc72d88a0e1af546804672e3381bab36e8ebcbc9fd7bff0a45888cef94016ca85b2ae897d1e64eb119b5626ca
|
data/lib/sambot/chef/cookbook.rb
CHANGED
@@ -56,6 +56,10 @@ module Sambot
|
|
56
56
|
|
57
57
|
def create_files(config)
|
58
58
|
['spec', 'test', 'attributes', '.vault.yml', '.consul.yml', 'local', 'README.md'].each { |resource| FS.copy(resource) }
|
59
|
+
#FS.mkdir('local/vault') unless FS.exist?('local/vault')
|
60
|
+
#FS.mkdir('local/consul') unless FS.exist?('local/consul')
|
61
|
+
#FS.copy('local/vault/helper.rb', true)
|
62
|
+
#FS.copy('local/consul/helper.rb', true)
|
59
63
|
['recipes', 'libraries', 'resources', 'files', 'templates'].each { |target| FS.mkdir(target) }
|
60
64
|
Dir.chdir('recipes') do
|
61
65
|
Template.new('recipes/install.rb.erb').write({config: config}, 'install.rb') unless FS.exist?('install.rb')
|
data/lib/sambot/chef/kitchen.rb
CHANGED
@@ -37,6 +37,10 @@ module Sambot
|
|
37
37
|
def add_platform_identifier(value, platform)
|
38
38
|
value['suites'].each do |suite|
|
39
39
|
suite['run_list'] = handle_customized_runlists(suite, platform)
|
40
|
+
# Changes to <platform> below to keep compatibility with existing cookbooks
|
41
|
+
platform = 'LOCAL' if platform == 'local'
|
42
|
+
platform = 'GCP' if platform == 'google'
|
43
|
+
platform = 'RACKSPACE' if platform = 'rackspace'
|
40
44
|
suite['attributes'] = suite['attributes'] || {}
|
41
45
|
suite['attributes']['cloud_platform'] = platform
|
42
46
|
suite['attributes']['vault'] = suite['attributes']['vault'] || {}
|
data/lib/sambot/fs.rb
CHANGED
@@ -21,12 +21,11 @@ module Sambot
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
def self.copy(resource)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
24
|
+
def self.copy(resource, force = false)
|
25
|
+
return if !force && !FS.exist?(resource)
|
26
|
+
filename = File.expand_path(File.join(File.dirname(__FILE__), 'templates', resource))
|
27
|
+
UI.debug("Copying #{filename} to #{resource}")
|
28
|
+
FileUtils.cp_r(filename, resource)
|
30
29
|
end
|
31
30
|
|
32
31
|
end
|
data/lib/sambot/version.rb
CHANGED