toque 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/lib/toque/chef.rb +9 -2
- data/lib/toque/version.rb +1 -1
- data/spec/toque/chef_spec.rb +2 -2
- 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: d8c361fa7700cd4c77e837ec39883387620295eb
|
4
|
+
data.tar.gz: e233b14828e321676ec9c1ed46abf52ad45c3a5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dc8ce01d37c3668901bcbe13a1a0fb612ac43018a48d4f10f112d29d307f6bf38253b5911d65f14440b49efeacfce91fd542fac89fc17cadfcefdb80dbaaea4
|
7
|
+
data.tar.gz: 0774dbe0fb9c3dad72d75e63ea950122ba1b87b358c4fdb1b31be8cabd5a6679f0165f595dc76f1bb338b5e78a7c1535b097afab82bff76eaea9bb949eee7f56
|
data/README.md
CHANGED
@@ -30,8 +30,9 @@ installed on first `run_list` call. **Toque** uses chef omnibus installer to
|
|
30
30
|
install a complete self-contained embedded chef environment.
|
31
31
|
|
32
32
|
You can specify a specific chef version by setting `:chef_version` to
|
33
|
-
something different to
|
34
|
-
|
33
|
+
something different to `nil`. If an already install with a different version
|
34
|
+
exists **toque** will run omnibus installer with specified version to
|
35
|
+
override installed chef.
|
35
36
|
|
36
37
|
See `cap toque:config` for more options.
|
37
38
|
|
data/lib/toque/chef.rb
CHANGED
@@ -15,7 +15,7 @@ module Toque
|
|
15
15
|
set_default :chef_omnibus_installer_url, 'http://www.opscode.com/chef/install.sh'
|
16
16
|
set_default :cookbooks_paths, %w(config/cookbooks vendor/cookbooks)
|
17
17
|
set_default :databags_path, 'config/databags'
|
18
|
-
set_default :chef_version,
|
18
|
+
set_default :chef_version, '10.24.0'
|
19
19
|
set_default :chef_debug, false
|
20
20
|
set_default :chef_solo, '/opt/chef/bin/chef-solo'
|
21
21
|
|
@@ -65,10 +65,16 @@ module Toque
|
|
65
65
|
#
|
66
66
|
def install_command
|
67
67
|
cmd = "#{top.sudo} bash"
|
68
|
-
cmd += " -s -- -v #{
|
68
|
+
cmd += " -s -- -v #{required_version}" unless required_version.nil?
|
69
69
|
cmd
|
70
70
|
end
|
71
71
|
|
72
|
+
# Return required chef version.
|
73
|
+
#
|
74
|
+
def required_version
|
75
|
+
fetch(:chef_version) || nil
|
76
|
+
end
|
77
|
+
|
72
78
|
#
|
73
79
|
# Tasks
|
74
80
|
#
|
@@ -76,6 +82,7 @@ module Toque
|
|
76
82
|
desc 'Install chef via omnibus installed if not preset.'
|
77
83
|
task :check do
|
78
84
|
install unless installed?
|
85
|
+
install unless installed_version != required_version && !required_version.nil?
|
79
86
|
end
|
80
87
|
|
81
88
|
desc 'Installs chef using omnibus installer.'
|
data/lib/toque/version.rb
CHANGED
data/spec/toque/chef_spec.rb
CHANGED
@@ -130,7 +130,7 @@ describe Toque::Chef, 'loaded into capistrano' do
|
|
130
130
|
|
131
131
|
it 'should install chef using omnibus installer' do
|
132
132
|
@configuration.toque.chef.install
|
133
|
-
expect(@configuration).to have_run("sudo -p 'sudo password: ' true && curl -L http://www.opscode.com/chef/install.sh | sudo -p 'sudo password: ' bash")
|
133
|
+
expect(@configuration).to have_run("sudo -p 'sudo password: ' true && curl -L http://www.opscode.com/chef/install.sh | sudo -p 'sudo password: ' bash -s -- -v 10.24.0")
|
134
134
|
end
|
135
135
|
|
136
136
|
context 'with custom installer URL' do
|
@@ -138,7 +138,7 @@ describe Toque::Chef, 'loaded into capistrano' do
|
|
138
138
|
|
139
139
|
it 'should install chef using custom omnibus installer' do
|
140
140
|
@configuration.toque.chef.install
|
141
|
-
expect(@configuration).to have_run("sudo -p 'sudo password: ' true && curl -L http://mysrv.tld/inst.sh | sudo -p 'sudo password: ' bash")
|
141
|
+
expect(@configuration).to have_run("sudo -p 'sudo password: ' true && curl -L http://mysrv.tld/inst.sh | sudo -p 'sudo password: ' bash -s -- -v 10.24.0")
|
142
142
|
end
|
143
143
|
end
|
144
144
|
|