Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/trac/manifests/init.pp

Issue 5688697504661504: Concept of Trac for whitelisting requests. (Closed)
Patch Set: Created Feb. 25, 2014, 8:11 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/trac/files/permissions.csv ('k') | modules/trac/templates/site.erb » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 class trac($domain) inherits private::trac {
2 package {['python-mysqldb','python-setuptools','subversion']: ensure => presen t}
3
4 include nginx
5
6 nginx::hostconfig {$domain:
7 content => template('trac/site.erb'),
8 enabled => true
9 }
10
11 user {'trac':
12 ensure => present,
13 comment => 'User of the trac installation',
14 home => '/home/trac',
15 managehome => true
16 }
17
18 class {'mysql::server':
19 config_hash => {'root_password' => $database_root_password}
20 }
21
22 mysql::db {'trac':
23 user => 'trac',
24 password => $database_password,
25 host => 'localhost',
26 grant => ['all'],
27 require => Class['mysql::config']
28 }
29
30 Exec {
31 path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin',
32 }
33
34 exec { 'collate':
35 command => "echo \"ALTER DATABASE trac DEFAULT CHARACTER SET utf8 COLLATE ut f8_bin;\" | mysql -u trac -p${database_password}",
36 require => Mysql::Db['trac']
37 }
38
39 exec { 'install_trac':
40 command => "easy_install Trac==1.0",
41 require => [
42 Package['python-mysqldb', 'python-setuptools'],
43 Exec['collate']],
44 unless => "which tracd"
45 }
46
47 exec { 'trac_env':
48 command => "trac-admin /home/trac/environment initenv \"Adblock Plus issue t racker\" mysql://trac:${database_password}@localhost:3306/trac",
49 require => Exec['install_trac'],
50 user => trac,
51 onlyif => "test ! -d /home/trac/environment"
52 }
53
54
55 exec { 'install_BlackMagicTicketTweaks':
56 command => "easy_install http://trac-hacks.org/svn/blackmagictickettweaksplu gin/0.12/",
57 require => [
58 Package['subversion'],
59 Exec['trac_env']]
60 }
61
62 exec { 'install_AccountManager':
63 command => "easy_install http://trac-hacks.org/svn/accountmanagerplugin/tags /acct_mgr-0.4.3/",
64 require => [
65 Package['subversion'],
66 Exec['trac_env']]
67 }
68
69
70 exec { 'install_TicketTemplate':
71 command => "easy_install http://trac-hacks.org/svn/tractickettemplateplugin/ 0.11/",
72 require => [
73 Package['subversion'],
74 Exec['trac_env']]
75 }
76
77
78 exec { 'install_AutocompleteUsers':
79 command => "easy_install http://trac-hacks.org/svn/autocompleteusersplugin/t runk/",
80 require => [
81 Package['subversion'],
82 Exec['trac_env']]
83 }
84
85 file {"/home/trac/environment/conf/trac.ini":
86 ensure => present,
87 content => template('trac/trac.ini.erb'),
88 require => Exec['trac_env']
89 }
90
91 file {"/home/trac/environment/htdocs/adblockplus_logo.png":
92 ensure => present,
93 source => 'puppet:///modules/trac/adblockplus_logo.png',
94 require => Exec['trac_env']
95 }
96
97 exec {"tracd":
98 command => "tracd --port 8088 -d -s /home/trac/environment",
99 require => [
100 Exec['install_BlackMagicTicketTweaks'],
101 Exec['install_AccountManager'],
102 Exec['install_AutocompleteUsers'],
103 Exec['install_TicketTemplate']]
104 }
105
106 exec {"update_env":
107 command => "trac-admin /home/trac/environment upgrade",
108 require => [
109 Exec['install_BlackMagicTicketTweaks'],
110 Exec['install_AccountManager'],
111 Exec['install_AutocompleteUsers'],
112 Exec['install_TicketTemplate']]
113 }
114
115 file {"/home/trac/permissions.csv":
116 ensure => present,
117 source => 'puppet:///modules/trac/permissions.csv',
118 require => Exec['trac_env']
119 }
120
121 exec { "set_permission_groups":
122 command => "trac-admin /home/trac/environment permission import /home/trac/p ermissions.csv",
123 require => [
124 Exec['trac_env'],
125 File['/home/trac/environment/conf/trac.ini']]
126 }
127
128 }
OLDNEW
« no previous file with comments | « modules/trac/files/permissions.csv ('k') | modules/trac/templates/site.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld