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