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

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

Issue 29469639: #1634 - Update file resource syntax in module trac (Closed)
Patch Set: Created June 20, 2017, 5:14 p.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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 class trac( 1 class trac(
2 $domain, 2 $domain,
3 $certificate, 3 $certificate,
4 $private_key, 4 $private_key,
5 $fcgi_config_dir = '/etc/nginx/trac.d', 5 $fcgi_config_dir = '/etc/nginx/trac.d',
6 $is_default = false) inherits private::trac { 6 $is_default = false) inherits private::trac {
7 7
8 package {['python-mysqldb','python-pip','subversion', 'tofrodos', 'graphviz']: 8 package {['python-mysqldb','python-pip','subversion', 'tofrodos', 'graphviz']:
9 ensure => present 9 ensure => present
10 } 10 }
11 11
12 include stdlib 12 include stdlib
13 include nginx 13 include nginx
14 include spawn_fcgi 14 include spawn_fcgi
15 15
16 file {$fcgi_config_dir: 16 file {$fcgi_config_dir:
17 ensure => directory, 17 ensure => directory,
18 owner => 'root', 18 owner => 'root',
19 mode => 755, 19 mode => '755',
20 require => Package['nginx'], 20 require => Package['nginx'],
21 } 21 }
22 22
23 nginx::hostconfig {$domain: 23 nginx::hostconfig {$domain:
24 content => "include $fcgi_config_dir/*;", 24 content => "include $fcgi_config_dir/*;",
25 is_default => $is_default, 25 is_default => $is_default,
26 certificate => $certificate, 26 certificate => $certificate,
27 private_key => $private_key, 27 private_key => $private_key,
28 log => 'access_log_trac', 28 log => 'access_log_trac',
29 require => File[$fcgi_config_dir], 29 require => File[$fcgi_config_dir],
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 exec { 'install_TracHTTPAuth': 131 exec { 'install_TracHTTPAuth':
132 command => 'pip install svn+https://trac-hacks.org/svn/httpauthplugin/trunk/ ', 132 command => 'pip install svn+https://trac-hacks.org/svn/httpauthplugin/trunk/ ',
133 require => Package['subversion', 'python-pip'], 133 require => Package['subversion', 'python-pip'],
134 unless => "python -c 'import httpauth'", 134 unless => "python -c 'import httpauth'",
135 } 135 }
136 136
137 file { '/home/trac/trac.ini': 137 file { '/home/trac/trac.ini':
138 ensure => present, 138 ensure => present,
139 source => 'puppet:///modules/trac/trac.ini', 139 source => 'puppet:///modules/trac/trac.ini',
140 owner => 'trac', 140 owner => 'trac',
141 mode => 644, 141 mode => '644',
142 } 142 }
143 143
144 file {'/home/trac/robots.txt': 144 file {'/home/trac/robots.txt':
145 ensure => 'present', 145 ensure => 'present',
146 source => 'puppet:///modules/trac/robots.txt', 146 source => 'puppet:///modules/trac/robots.txt',
147 owner => 'trac', 147 owner => 'trac',
148 mode => 644, 148 mode => '644',
149 } 149 }
150 150
151 file {"trac_performance_fix_py": 151 file {"trac_performance_fix_py":
152 ensure => present, 152 ensure => present,
153 path => '/usr/local/lib/python2.7/dist-packages/trac_performance_fix.py', 153 path => '/usr/local/lib/python2.7/dist-packages/trac_performance_fix.py',
154 source => 'puppet:///modules/trac/trac_performance_fix.py', 154 source => 'puppet:///modules/trac/trac_performance_fix.py',
155 owner => 'root', 155 owner => 'root',
156 mode => 644, 156 mode => '644',
157 } 157 }
158 158
159 159
160 define instance ( 160 define instance (
161 $config = 'trac/trac.ini.erb', 161 $config = 'trac/trac.ini.erb',
162 $description = 'Issue Tracker', 162 $description = 'Issue Tracker',
163 $location = '/', 163 $location = '/',
164 $logo = 'puppet:///modules/trac/logo.png', 164 $logo = 'puppet:///modules/trac/logo.png',
165 $database = 'trac', 165 $database = 'trac',
166 $permissions = 'puppet:///modules/trac/permissions.csv', 166 $permissions = 'puppet:///modules/trac/permissions.csv',
(...skipping 10 matching lines...) Expand all
177 charset => 'utf8', 177 charset => 'utf8',
178 collate => 'utf8_bin', 178 collate => 'utf8_bin',
179 require => Class['mysql::server'], 179 require => Class['mysql::server'],
180 } 180 }
181 181
182 $location_base = regsubst($location, '/+$', '') 182 $location_base = regsubst($location, '/+$', '')
183 183
184 file {"${trac::fcgi_config_dir}/${name}.conf": 184 file {"${trac::fcgi_config_dir}/${name}.conf":
185 ensure => file, 185 ensure => file,
186 owner => 'root', 186 owner => 'root',
187 mode => 644, 187 mode => '644',
188 content => template('trac/fcgi.conf.erb'), 188 content => template('trac/fcgi.conf.erb'),
189 require => File[$trac::fcgi_config_dir], 189 require => File[$trac::fcgi_config_dir],
190 notify => Service['nginx'], 190 notify => Service['nginx'],
191 } 191 }
192 192
193 exec {"trac_env_${name}": 193 exec {"trac_env_${name}":
194 command => shellquote( 194 command => shellquote(
195 'trac-admin', "/home/trac/$environment", 'initenv', $description, 195 'trac-admin', "/home/trac/$environment", 'initenv', $description,
196 "mysql://trac:${database_password}@localhost:3306/$database"), 196 "mysql://trac:${database_password}@localhost:3306/$database"),
197 logoutput => true, 197 logoutput => true,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 # Daily restart required for log rotation of all instances at once 290 # Daily restart required for log rotation of all instances at once
291 cron {'restart-trac-daily': 291 cron {'restart-trac-daily':
292 command => 'service spawn-fcgi restart >/tmp/spawn-fcgi-restart.log', 292 command => 'service spawn-fcgi restart >/tmp/spawn-fcgi-restart.log',
293 environment => hiera('cron::environment', []), 293 environment => hiera('cron::environment', []),
294 hour => '1', 294 hour => '1',
295 minute => '0', 295 minute => '0',
296 user => 'root', 296 user => 'root',
297 } 297 }
298 } 298 }
299 299
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld