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

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

Issue 5734493784637440: Issue 245 - Unify SSL configuration for all servers (Closed)
Patch Set: Created April 2, 2014, 2:05 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
OLDNEW
1 class statsmaster { 1 class statsmaster(
2 $domain,
3 $is_default=false
4 ) {
2 user {'stats': 5 user {'stats':
3 ensure => present, 6 ensure => present,
4 home => '/home/stats', 7 home => '/home/stats',
5 managehome => true, 8 managehome => true,
6 } 9 }
7 10
8 file {'/home/stats/.ssh': 11 file {'/home/stats/.ssh':
9 ensure => directory, 12 ensure => directory,
10 owner => stats, 13 owner => stats,
11 mode => 0600, 14 mode => 0600,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 source => 'puppet:///modules/statsmaster/usercounts.html', 70 source => 'puppet:///modules/statsmaster/usercounts.html',
68 owner => stats, 71 owner => stats,
69 } 72 }
70 73
71 file {'/var/www/htpasswd': 74 file {'/var/www/htpasswd':
72 ensure => file, 75 ensure => file,
73 mode => 0444, 76 mode => 0444,
74 source => 'puppet:///modules/private/stats-htpasswd', 77 source => 'puppet:///modules/private/stats-htpasswd',
75 } 78 }
76 79
77 file {'/etc/nginx/sites-available/adblockplus.org_sslcert.key': 80 nginx::hostconfig{$domain:
78 ensure => file, 81 source => 'puppet:///modules/statsmaster/site.conf',
79 notify => Service['nginx'], 82 is_default => $is_default,
80 before => Nginx::Hostconfig['stats.adblockplus.org'], 83 certificate => 'adblockplus.org_sslcert.pem',
81 mode => 0400, 84 private_key => 'adblockplus.org_sslcert.key',
82 source => 'puppet:///modules/private/adblockplus.org_sslcert.key' 85 log => 'access_log_stats'
83 }
84
85 file {'/etc/nginx/sites-available/adblockplus.org_sslcert.pem':
86 ensure => file,
87 notify => Service['nginx'],
88 before => Nginx::Hostconfig['stats.adblockplus.org'],
89 mode => 0400,
90 source => 'puppet:///modules/private/adblockplus.org_sslcert.pem'
91 }
92
93 nginx::hostconfig{'stats.adblockplus.org':
94 source => 'puppet:///modules/statsmaster/stats.adblockplus.org',
95 enabled => true
96 }
97
98 file {'/etc/logrotate.d/nginx_stats.adblockplus.org':
99 ensure => file,
100 mode => 0444,
101 require => Nginx::Hostconfig['stats.adblockplus.org'],
102 source => 'puppet:///modules/statsmaster/logrotate'
103 } 86 }
104 87
105 cron {'updatestats': 88 cron {'updatestats':
106 ensure => present, 89 ensure => present,
107 require => [ 90 require => [
108 Package['pypy'], 91 Package['pypy'],
109 Package['python-jinja2'], 92 Package['python-jinja2'],
110 Exec["fetch_sitescripts"] 93 Exec["fetch_sitescripts"]
111 ], 94 ],
112 command => "pypy -m sitescripts.stats.bin.logprocessor && python -m sitescri pts.stats.bin.pagegenerator", 95 command => "pypy -m sitescripts.stats.bin.logprocessor && python -m sitescri pts.stats.bin.pagegenerator",
(...skipping 14 matching lines...) Expand all
127 ensure => present, 110 ensure => present,
128 require => File['/opt/cron_geoipdb_update.sh'], 111 require => File['/opt/cron_geoipdb_update.sh'],
129 command => '/opt/cron_geoipdb_update.sh', 112 command => '/opt/cron_geoipdb_update.sh',
130 environment => ['MAILTO=admins@adblockplus.org,root'], 113 environment => ['MAILTO=admins@adblockplus.org,root'],
131 user => root, 114 user => root,
132 hour => 3, 115 hour => 3,
133 minute => 15, 116 minute => 15,
134 monthday => 3, 117 monthday => 3,
135 } 118 }
136 } 119 }
OLDNEW

Powered by Google App Engine
This is Rietveld