provizioning 0.9.13 → 0.9.14

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.
@@ -1,10 +1,10 @@
1
1
  #!/bin/bash
2
2
 
3
- # ruby-stack - Install Ruby and friends.
4
- # Author: Francesc Esplugas <http://francescesplugas.com/>
3
+ # Bootstrap an ubuntu server
4
+ # Author: Victor Castell <http://francescesplugas.com/>
5
+ # Based on work by: Francesc Esplugas <http://francescesplugas.com/>
5
6
  # License: MIT-LICENSE
6
7
  #
7
- # DON'T CHANGE THIS FILE UNLESS YOU KNOW WHAT YOU'RE DOING!
8
8
 
9
9
  ##############################################################################
10
10
  # Abort on any error.
@@ -26,18 +26,13 @@ then
26
26
  wget https://raw.github.com/seasonlabs/provizioning/master/bootstrap/lucid.sources.list -O sources.list
27
27
  fi
28
28
 
29
- if [ "$var" == "Ubuntu 11.04 \n \l" ]
30
- then
31
- wget https://raw.github.com/seasonlabs/provizioning/master/bootstrap/natty.sources.list -O sources.list
32
- fi
33
-
34
29
  if [ "$var" == "Ubuntu 12.04 \n \l" ]
35
30
  then
36
31
  wget https://raw.github.com/seasonlabs/provizioning/master/bootstrap/precise.sources.list -O sources.list
37
32
  fi
38
33
 
39
34
  export DEBIAN_FRONTEND=noninteractive
40
- apt-get update
35
+ apt-get -y update
41
36
  apt-get -y upgrade
42
37
 
43
38
  ##############################################################################
@@ -77,5 +72,11 @@ fi
77
72
  # Cleanup the installation
78
73
  apt-get -y autoremove
79
74
 
75
+ ##############################################################################
80
76
  # Install Puppet
81
- gem install puppet --no-ri --no-rdoc
77
+ ##############################################################################
78
+
79
+ gem install puppet --no-ri --no-rdoc
80
+ puppet resource group puppet ensure=present
81
+ puppet resource user puppet ensure=present gid=puppet shell='/sbin/nologin'
82
+ reboot
@@ -1,3 +1,3 @@
1
1
  module Provizioning
2
- VERSION = "0.9.13"
2
+ VERSION = "0.9.14"
3
3
  end
@@ -25,10 +25,9 @@ class mongo {
25
25
  }
26
26
 
27
27
  class ubuntu {
28
- include apt
29
-
30
28
  exec {"get-10gen-apt-key":
31
- command => "apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10"
29
+ command => "apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10",
30
+ unless => "apt-key list | grep 7F0CEB10",
32
31
  }
33
32
 
34
33
  file {"/etc/apt/sources.list.d/mongo.list":
@@ -48,7 +47,9 @@ class mongo {
48
47
 
49
48
  exec {"update apt to find mongodb":
50
49
  command => "/usr/bin/apt-get -y update",
51
- require => File["/etc/apt/sources.list.d/mongo.list"]
50
+ subscribe => File["/etc/apt/sources.list.d/mongo.list"],
51
+ require => File["/etc/apt/sources.list.d/mongo.list"],
52
+ refreshonly => true,
52
53
  }
53
54
 
54
55
  package {"mongodb-10gen":
@@ -33,18 +33,17 @@ class nginx {
33
33
  if ! defined(Package['nginx']) { package { nginx: ensure => installed }}
34
34
 
35
35
  service { nginx:
36
- ensure => running,
37
- enable => true,
36
+ ensure => running,
37
+ enable => true,
38
38
  hasrestart => true,
39
39
  require => [File["/etc/nginx/nginx.conf"], File["/etc/apt/sources.list.d/nginx.list"]],
40
40
  }
41
41
 
42
42
  class ubuntu {
43
- include apt
44
-
45
- exec {"get-nginx-apt-key":
46
- command => "apt-key adv --keyserver keyserver.ubuntu.com --recv C3173AA6"
47
- }
43
+ exec {"get-nginx-apt-key":
44
+ command => "apt-key adv --keyserver keyserver.ubuntu.com --recv C3173AA6",
45
+ unless => "apt-key list | grep C3173AA6",
46
+ }
48
47
 
49
48
  file {"/etc/apt/sources.list.d/nginx.list":
50
49
  ensure => present,
@@ -57,10 +56,12 @@ class nginx {
57
56
  exec {"update apt to find nginx":
58
57
  command => "/usr/bin/apt-get -y update",
59
58
  require => File["/etc/apt/sources.list.d/nginx.list"],
59
+ subscribe => File["/etc/apt/sources.list.d/nginx.list"],
60
+ refreshonly => true,
60
61
  }
61
- }
62
+ }
62
63
 
63
- file { "/etc/nginx/nginx.conf":
64
+ file { "/etc/nginx/nginx.conf":
64
65
  ensure => present,
65
66
  mode => 644,
66
67
  owner => root,
@@ -68,7 +69,7 @@ class nginx {
68
69
  content => template("nginx/nginx.conf.erb"),
69
70
  notify => Exec["reload-nginx"],
70
71
  require => Package["nginx"],
71
- }
72
+ }
72
73
 
73
74
  file { $nginx_conf:
74
75
  ensure => directory,
@@ -103,8 +104,8 @@ class nginx {
103
104
 
104
105
  exec { "reload-nginx":
105
106
  command => "/etc/init.d/nginx reload",
106
- refreshonly => true,
107
- }
107
+ refreshonly => true,
108
+ }
108
109
 
109
110
  # Define: nginx::config
110
111
  #
@@ -31,8 +31,6 @@ class postgres {
31
31
  }
32
32
 
33
33
  class ubuntu {
34
- include apt
35
-
36
34
  exec {"get-postgres-apt-key":
37
35
  command => "apt-key adv --keyserver keyserver.ubuntu.com --recv 8683D8A2"
38
36
  }
@@ -48,6 +46,8 @@ class postgres {
48
46
  exec {"update apt to find postgres":
49
47
  command => '/usr/bin/apt-get -y update',
50
48
  require => File['/etc/apt/sources.list.d/postgres.list'],
49
+ subscribe => File['/etc/apt/sources.list.d/postgres.list'],
50
+ refreshonly => true,
51
51
  }
52
52
  }
53
53
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: provizioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.13
4
+ version: 0.9.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-16 00:00:00.000000000 Z
12
+ date: 2012-10-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -56,7 +56,6 @@ files:
56
56
  - Rakefile
57
57
  - bootstrap/bootstrap.sh
58
58
  - bootstrap/lucid.sources.list
59
- - bootstrap/natty.sources.list
60
59
  - bootstrap/precise.sources.list
61
60
  - lib/provizioning/puppet.rb
62
61
  - lib/provizioning/version.rb
@@ -1,13 +0,0 @@
1
- #############################################################
2
- ################### OFFICIAL UBUNTU REPOS ###################
3
- #############################################################
4
-
5
- ###### Ubuntu Main Repos
6
- deb http://archive.ubuntu.com/ubuntu/ natty main restricted universe multiverse
7
- deb-src http://archive.ubuntu.com/ubuntu/ natty main
8
-
9
- ###### Ubuntu Update Repos
10
- deb http://archive.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse
11
- deb http://archive.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse
12
- deb http://archive.ubuntu.com/ubuntu/ natty-proposed main restricted universe multiverse
13
- deb http://archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse