OLD | NEW |
1 class downloadserver( | 1 class downloadserver( |
2 $domain, | 2 $domain, |
3 $certificate, | 3 $certificate, |
4 $private_key, | 4 $private_key, |
5 $is_default = false | 5 $is_default = false |
6 ) { | 6 ) { |
7 | 7 |
8 class {'nginx': | 8 class {'nginx': |
9 worker_connections => 4000, | 9 worker_connections => 4000, |
10 ssl_session_cache => off, | 10 ssl_session_cache => off, |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 managehome => true | 91 managehome => true |
92 } | 92 } |
93 | 93 |
94 file {'/home/rsync/.ssh': | 94 file {'/home/rsync/.ssh': |
95 ensure => directory, | 95 ensure => directory, |
96 require => User['rsync'], | 96 require => User['rsync'], |
97 owner => rsync, | 97 owner => rsync, |
98 mode => 0600; | 98 mode => 0600; |
99 } | 99 } |
100 | 100 |
101 file {'/home/rsync/.ssh/known_hosts': | |
102 ensure => file, | |
103 owner => rsync, | |
104 mode => 0444, | |
105 source => 'puppet:///modules/downloadserver/known_hosts' | |
106 } | |
107 | |
108 file {'/home/rsync/.ssh/id_rsa': | 101 file {'/home/rsync/.ssh/id_rsa': |
109 ensure => file, | 102 ensure => file, |
110 owner => rsync, | 103 owner => rsync, |
111 mode => 0400, | 104 mode => 0400, |
112 source => 'puppet:///modules/private/rsync@downloads.adblockplus.org' | 105 source => 'puppet:///modules/private/rsync@downloads.adblockplus.org' |
113 } | 106 } |
114 | 107 |
115 file {'/home/rsync/.ssh/id_rsa.pub': | 108 file {'/home/rsync/.ssh/id_rsa.pub': |
116 ensure => file, | 109 ensure => file, |
117 owner => rsync, | 110 owner => rsync, |
118 mode => 0400, | 111 mode => 0400, |
119 source => 'puppet:///modules/private/rsync@downloads.adblockplus.org.pub' | 112 source => 'puppet:///modules/private/rsync@downloads.adblockplus.org.pub' |
120 } | 113 } |
121 | 114 |
122 cron {'mirror-devbuilds': | 115 cron {'mirror-devbuilds': |
123 ensure => present, | 116 ensure => present, |
124 require => [File['/home/rsync/.ssh/known_hosts'], | 117 require => [ |
125 File['/home/rsync/.ssh/id_rsa'], | 118 File['/home/rsync/.ssh/id_rsa'], |
126 File['/var/www/devbuilds']], | 119 File['/var/www/devbuilds'], |
127 command => 'rsync -e ssh -ltprz --delete devbuilds@ssh.adblockplus.org:. /va
r/www/devbuilds', | 120 ], |
| 121 command => 'rsync -e ssh -ltprz --delete devbuilds@server16.adblockplus.org:
. /var/www/devbuilds', |
128 environment => hiera('cron::environment', []), | 122 environment => hiera('cron::environment', []), |
129 user => rsync, | 123 user => rsync, |
130 hour => '*', | 124 hour => '*', |
131 minute => '4-54/10' | 125 minute => '4-54/10' |
132 } | 126 } |
133 } | 127 } |
OLD | NEW |