Commit 1a1423e56b4ae81cd1ad99fb3250b0b015b1dcc4

Authored by Sergio Oliveira
1 parent 188e1d3d

Started init.pp refactor

Showing 1 changed file with 23 additions and 82 deletions   Show diff stats
puppet/modules/colab/manifests/init.pp
1 1  
2 2 class colab {
3   - # Common
4   - include apt
5   - include ps1
6   - include vim
7   - include ntp
8   - include locale
9   - include timezone
10   - include postfix
11 3  
12   - include supervisor
13   - include colab::requirements
14   - include colab::cronjobs
15   -
16   - apt::ppa { 'ppa:nginx/stable': }
  4 + require pip
17 5  
18   - class { 'nginx':
19   - require => Apt::Ppa['ppa:nginx/stable'],
20   - }
21   -
22   - Mailalias {
23   - notify => Exec['newaliases'],
24   - require => Class['postfix'],
25   - }
26   -
27   - exec { 'newaliases':
28   - command => 'sendmail -bi',
29   - path => '/usr/sbin',
30   - refreshonly => true,
31   - }
  6 + include appdeploy::deps::lxml
  7 + include appdeploy::deps::postgresql
  8 + include colab::cronjobs
32 9  
33   - group { 'colab':
34   - ensure => present,
35   - }
  10 + appdeploy::django { 'colab':
  11 + user => 'colab',
  12 + directory => '/home/colab/colab/src',
  13 + proxy_hosts => [
  14 + 'colab.interlegis.leg.br',
  15 + ],
36 16  
37   - user { 'colab':
38   - ensure => present,
39   - managehome => true,
40   - shell => '/bin/bash',
41   - gid => 'colab',
42   - groups => ['sudo'],
43 17 }
44 18  
45   - mailalias { 'colab':
46   - ensure => present,
47   - recipient => 'root',
48   - }
  19 + ensure_packages(['mercurial', 'openjdk-7-jre', 'memcached', 'sshfs'])
49 20  
50   - file { 'colab-sudoers':
51   - ensure => present,
52   - path => '/etc/sudoers.d/colab-sudoers',
53   - source => 'puppet:///modules/colab/colab-sudoers',
54   - mode => '0440',
55   - owner => root,
56   - group => root,
  21 + # XMPP connection manager
  22 + package { 'punjab':
  23 + ensure => installed,
  24 + provider => pip,
57 25 }
58 26  
59   - file { 'root-ssh-dir':
60   - ensure => directory,
61   - mode => '0700',
62   - path => '/root/.ssh',
  27 + # Punjab dep
  28 + package { 'Twisted':
  29 + ensure => installed,
  30 + provider => pip,
63 31 }
64 32  
65   - # Should generate instead of copying
66   - #file { 'root-ssh-private-key':
67   - # ensure => present,
68   - # mode => '0600',
69   - # path => '/root/.ssh/id_rsa',
70   - # source => 'puppet:///modules/colab/root_id_rsa',
71   - # owner => root,
72   - # group => root,
73   - #}
74   -
75   - #file { 'root-ssh-public-key':
76   - # ensure => present,
77   - # mode => '0644',
78   - # path => '/root/.ssh/id_rsa.pub',
79   - # source => 'puppet:///modules/colab/root_id_rsa.pub',
80   - # owner => root,
81   - # group => root,
82   - #}
83   -
84   - supervisor::app { 'colab':
85   - command => '/home/colab/.virtualenvs/colab/bin/gunicorn colab.wsgi:application -c colab/gunicorn.conf.py',
86   - directory => '/home/colab/colab/src/',
87   - user => 'colab',
  33 + # Punjab dep
  34 + package { 'pyOpenSSL':
  35 + ensure => installed,
  36 + provider => pip,
88 37 }
89 38  
90 39 supervisor::app { 'punjab':
... ... @@ -98,12 +47,4 @@ class colab {
98 47 directory => '/home/colab/apache-solr-3.6.2/example',
99 48 user => 'colab',
100 49 }
101   -
102   - nginx::config { 'nginx':
103   - content => template('colab/nginx/extra_conf.erb'),
104   - }
105   -
106   - nginx::site { '000-colab':
107   - content => template('colab/nginx/site_default.erb'),
108   - }
109 50 }
... ...