OLD | NEW |
1 class trac( | 1 class trac( |
2 $domain, | 2 $domain, |
3 $is_default = false) inherits private::trac { | 3 $is_default = false) inherits private::trac { |
4 package {['python-mysqldb','python-pip','subversion', 'tofrodos', 'graphviz']: | 4 package {['python-mysqldb','python-pip','subversion', 'tofrodos', 'graphviz']: |
5 ensure => present | 5 ensure => present |
6 } | 6 } |
7 | 7 |
8 include nginx, spawn-fcgi | 8 include nginx, spawn-fcgi |
9 | 9 |
10 file {'/etc/nginx/adblockplus.org_sslcert.key': | 10 file {'/etc/nginx/adblockplus.org_sslcert.key': |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 require => Package['subversion', 'python-pip', 'graphviz'], | 108 require => Package['subversion', 'python-pip', 'graphviz'], |
109 unless => "python -c 'import mastertickets'", | 109 unless => "python -c 'import mastertickets'", |
110 } | 110 } |
111 | 111 |
112 exec { 'install_NeverNotifyUpdater': | 112 exec { 'install_NeverNotifyUpdater': |
113 command => "pip install svn+http://trac-hacks.org/svn/nevernotifyupdaterplug
in/1.0/", | 113 command => "pip install svn+http://trac-hacks.org/svn/nevernotifyupdaterplug
in/1.0/", |
114 require => Package['subversion', 'python-pip'], | 114 require => Package['subversion', 'python-pip'], |
115 unless => "python -c 'import nevernotifyupdaterplugin'", | 115 unless => "python -c 'import nevernotifyupdaterplugin'", |
116 } | 116 } |
117 | 117 |
| 118 exec { 'install_ThemeEngine': |
| 119 command => "pip install TracThemeEngine", |
| 120 require => Package['python-pip'], |
| 121 unless => "python -c 'import themeengine'", |
| 122 } |
| 123 |
118 file {"/home/trac/environment/conf/trac.ini": | 124 file {"/home/trac/environment/conf/trac.ini": |
119 ensure => present, | 125 ensure => present, |
120 content => template('trac/trac.ini.erb'), | 126 content => template('trac/trac.ini.erb'), |
121 owner => trac, | 127 owner => trac, |
122 require => Exec['trac_env'] | 128 require => Exec['trac_env'] |
123 } | 129 } |
124 | 130 |
125 file {"/home/trac/htdocs/htdocs/common/adblockplus_logo.png": | 131 file {"/home/trac/htdocs/htdocs/common/adblockplus_logo.png": |
126 ensure => present, | 132 ensure => present, |
127 source => 'puppet:///modules/trac/adblockplus_logo.png', | 133 source => 'puppet:///modules/trac/adblockplus_logo.png', |
128 owner => trac, | 134 owner => trac, |
129 require => Exec['deploy'] | 135 require => Exec['deploy'] |
130 } | 136 } |
131 | 137 |
| 138 file {"/home/trac/environment/htdocs/theme.css": |
| 139 ensure => present, |
| 140 source => 'puppet:///modules/trac/theme.css', |
| 141 owner => trac, |
| 142 require => Exec['trac_env'] |
| 143 } |
| 144 |
132 exec {"update_env": | 145 exec {"update_env": |
133 command => "trac-admin /home/trac/environment upgrade", | 146 command => "trac-admin /home/trac/environment upgrade", |
134 user => trac, | 147 user => trac, |
135 require => [ | 148 require => [ |
136 File['/home/trac/environment/conf/trac.ini'], | 149 File['/home/trac/environment/conf/trac.ini'], |
137 Exec['install_SensitiveTickets'], | 150 Exec['install_SensitiveTickets'], |
138 Exec['install_BlackMagicTicketTweaks'], | 151 Exec['install_BlackMagicTicketTweaks'], |
139 Exec['install_AccountManager'], | 152 Exec['install_AccountManager'], |
140 Exec['install_AutocompleteUsers'], | 153 Exec['install_AutocompleteUsers'], |
141 Exec['install_TicketTemplate'], | 154 Exec['install_TicketTemplate'], |
142 Exec['install_NeverNotifyUpdater'], | 155 Exec['install_NeverNotifyUpdater'], |
143 Exec['install_MasterTickets']] | 156 Exec['install_MasterTickets'], |
| 157 Exec['install_ThemeEngine']] |
144 } | 158 } |
145 | 159 |
146 exec {"deploy": | 160 exec {"deploy": |
147 command => "trac-admin /home/trac/environment deploy /home/trac/htdocs && fr
omdos /home/trac/htdocs/cgi-bin/trac.fcgi && chmod 755 /home/trac/htdocs/cgi-bin
/trac.fcgi", | 161 command => "trac-admin /home/trac/environment deploy /home/trac/htdocs && fr
omdos /home/trac/htdocs/cgi-bin/trac.fcgi && chmod 755 /home/trac/htdocs/cgi-bin
/trac.fcgi", |
148 user => trac, | 162 user => trac, |
149 require => [ | 163 require => [ |
150 Exec["update_env"], | 164 Exec["update_env"], |
151 Package["tofrodos"]] | 165 Package["tofrodos"]] |
152 } | 166 } |
153 | 167 |
154 spawn-fcgi::pool {"tracd": | 168 spawn-fcgi::pool {"tracd": |
155 ensure => present, | 169 ensure => present, |
156 fcgi_app => "/home/trac/htdocs/cgi-bin/trac.fcgi", | 170 fcgi_app => "/home/trac/htdocs/cgi-bin/trac.fcgi", |
157 socket => "/tmp/trac-fastcgi.sock", | 171 socket => "/tmp/trac-fastcgi.sock", |
158 mode => "0666", | 172 mode => "0666", |
159 user => trac, | 173 user => trac, |
160 children => 1, | 174 children => 1, |
161 require => Exec['deploy'], | 175 require => Exec['deploy'], |
162 } | 176 } |
163 | 177 |
164 file {"/home/trac/permissions.csv": | 178 file {"/home/trac/permissions.csv": |
165 ensure => present, | 179 ensure => present, |
166 owner => trac, | 180 owner => trac, |
167 source => 'puppet:///modules/trac/permissions.csv' | 181 source => 'puppet:///modules/trac/permissions.csv' |
168 } | 182 } |
169 | 183 |
170 } | 184 } |
OLD | NEW |