blimpy 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,7 +44,7 @@ module Blimpy
44
44
  run_sudo = ''
45
45
  run_sudo = 'sudo' if use_sudo?(box)
46
46
 
47
- box.ssh_into("cd #{dir_name} && #{run_sudo} ./gempath.sh #{command}")
47
+ box.ssh_into("cd #{dir_name} && chmod 755 ./gempath.sh #{command} && #{run_sudo} ./gempath.sh #{command}")
48
48
  end
49
49
 
50
50
  def postflight(box)
@@ -1,3 +1,3 @@
1
1
  module Blimpy
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
  end
@@ -1,18 +1,26 @@
1
1
  #!/bin/sh -x
2
2
 
3
3
  OSNAME=`uname`
4
+ LINUXFLAVOR=`lsb_release -is`
5
+ PROG=`basename $0`
4
6
 
5
- if [ "${OSNAME}" = "FreeBSD" ]; then
7
+ Info () {
8
+ echo "$PROG : $*"
9
+ }
6
10
 
7
- which pkg > /dev/null
11
+ Fatal () {
12
+ echo "$PROG : FATAL: $*"
13
+ exit 1
14
+ }
8
15
 
16
+ Info "Begin"
17
+ if [ "${OSNAME}" = "FreeBSD" ]; then
18
+ which pkg > /dev/null 2>&1
9
19
  if [ $? -ne 0 ]; then
10
- echo "pkgng is not installed!"
20
+ Info "pkgng is not installed!"
11
21
  ftp -V ftp://anonymous:ec2@ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-stable/Latest/pkg.tbz
12
22
  pkg_add ./pkg.tbz
13
-
14
23
  echo "PACKAGESITE : http://pkgbeta.freebsd.org/freebsd-9-amd64/latest/" > /usr/local/etc/pkg.conf
15
-
16
24
  pkg update -q
17
25
  # Update pkgng itself
18
26
  pkg install -y pkg
@@ -20,23 +28,38 @@ if [ "${OSNAME}" = "FreeBSD" ]; then
20
28
  pkg install -y rsync
21
29
  # Install puppet so we can get that up and running
22
30
  pkg install -y puppet
23
- fi;
24
-
25
- else
26
-
27
- export PATH=/var/lib/gems/1.8/bin:/usr/local/bin:$PATH
28
-
29
- which puppet
30
-
31
- if [ $? -ne 0 ]; then
32
- apt-get update
33
-
34
- apt-get install -y ruby1.8 \
35
- ruby1.8-dev \
36
- libopenssl-ruby1.8 \
37
- rubygems
38
-
39
- gem install puppet --version "~> 2.7" --no-ri --no-rdoc
40
31
  fi
41
-
32
+ else
33
+ case "$LINUXFLAVOR" in
34
+ RedHat*) # Extract the major version number
35
+ VERSION=`lsb_release -ids | sed 's/.*release \([0-9]\).*/\1/'`
36
+ if [ $VERSION -eq 5 ]; then
37
+ rpm -ivh http://yum.puppetlabs.com/el/5/products/i386/puppetlabs-release-5-6.noarch.rpm
38
+ elif [ $VERSION -eq 6 ]; then
39
+ rpm -ivh http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm
40
+ else
41
+ Fatal "Unsupported Red Hat release: $VERSION"
42
+ fi
43
+ # Disable EPEL if for some reason it is configured on this host
44
+ # as we don't want to get some old Puppet from there.
45
+ if [ -f /etc/yum.repos.d/epel.repo ]; then
46
+ yum install -y puppet --disablerepo=epel
47
+ else
48
+ yum install -y puppet
49
+ fi
50
+ ;;
51
+ Ubuntu) export PATH=/var/lib/gems/1.8/bin:/usr/local/bin:$PATH
52
+ which puppet > /dev/null 2>&1
53
+ if [ $? -ne 0 ]; then
54
+ apt-get update
55
+ apt-get install -y ruby1.8 \
56
+ ruby1.8-dev \
57
+ libopenssl-ruby1.8 \
58
+ rubygems
59
+ gem install puppet --version "~> 2.7" --no-ri --no-rdoc
60
+ fi
61
+ ;;
62
+ *) Fatal "Unsupported Linux flavor: $LINUXFLAVOR"
63
+ ;;
64
+ esac
42
65
  fi
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blimpy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-16 00:00:00.000000000Z
12
+ date: 2012-12-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog
16
- requirement: &23035260 !ruby/object:Gem::Requirement
16
+ requirement: &27221180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *23035260
24
+ version_requirements: *27221180
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &23034820 !ruby/object:Gem::Requirement
27
+ requirement: &27220740 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *23034820
35
+ version_requirements: *27220740
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: minitar
38
- requirement: &23034380 !ruby/object:Gem::Requirement
38
+ requirement: &27220300 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *23034380
46
+ version_requirements: *27220300
47
47
  description: Blimpy is a tool for managing a fleet of machines in the CLOUD!
48
48
  email:
49
49
  - tyler@monkeypox.org
@@ -117,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  segments:
119
119
  - 0
120
- hash: -253001812742767215
120
+ hash: -4567911356011324298
121
121
  required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  none: false
123
123
  requirements:
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  segments:
128
128
  - 0
129
- hash: -253001812742767215
129
+ hash: -4567911356011324298
130
130
  requirements: []
131
131
  rubyforge_project:
132
132
  rubygems_version: 1.8.10