chef-solo-wrapper 0.0.7 → 0.0.8
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.
- data/bin/cs +1 -1
- data/lib/config_helper.rb +16 -11
- metadata +3 -3
data/bin/cs
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
# See the License for the specific language governing permissions and
|
17
17
|
# limitations under the License.
|
18
18
|
|
19
|
-
CHEF_SOLO_WRAPPER_VERSION = '0.0.
|
19
|
+
CHEF_SOLO_WRAPPER_VERSION = '0.0.8'
|
20
20
|
COOKBOOKS_SRC_DEST = '/usr/src/chef-cookbooks'
|
21
21
|
|
22
22
|
require 'rubygems'
|
data/lib/config_helper.rb
CHANGED
@@ -30,23 +30,28 @@ class ConfigHelper
|
|
30
30
|
def install_chef
|
31
31
|
puts
|
32
32
|
puts '=> Setting up Chef Solo.'
|
33
|
-
|
34
|
-
|
33
|
+
if system("`which lsb_release`")
|
34
|
+
lsb_release = `lsb_release -si`
|
35
|
+
lsb_release.strip!
|
36
|
+
else
|
35
37
|
puts ' DEBUG: lsb_release not found.' if @debug
|
36
38
|
lsb_release = 'none'
|
37
39
|
end
|
38
40
|
case "#{lsb_release.strip}"
|
39
41
|
when 'Ubuntu'
|
40
42
|
puts 'Ubuntu detected; installing from opscode apt.'
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
43
|
+
if ! system("dpkg -l | grep chef")
|
44
|
+
system("DEBIAN_FRONTEND=noninteractive")
|
45
|
+
system("sudo mkdir -p /etc/apt/trusted.gpg.d")
|
46
|
+
system("gpg --keyserver keys.gnupg.net --recv-keys 83EF826A")
|
47
|
+
system("gpg --export packages@opscode.com | sudo tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null")
|
48
|
+
system('echo "deb http://apt.opscode.com/ $(lsb_release -cs)-0.10 main" > /etc/apt/sources.list.d/opscode.list')
|
49
|
+
system("sudo apt-get -y update")
|
50
|
+
system("sudo apt-get -y upgrade")
|
51
|
+
system("sudo apt-get -y install chef")
|
52
|
+
else
|
53
|
+
puts 'Chef already installed, skipping.'
|
54
|
+
end
|
50
55
|
exit
|
51
56
|
else
|
52
57
|
puts 'Installing Chef RubyGem...'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-solo-wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Fordham
|