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

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

Issue 6029451183783936: Add Filtermaster (Closed)
Patch Set: Added all Changes, needs testing Created Nov. 8, 2013, 4:25 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 | « modules/filtermaster/files/sitescripts ('k') | 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
(Empty)
1 class filtermaster {
2 Cron {
3 #TODO: Change The MAILTO to the correct paramater befor commiting
4 environment => ['MAILTO=ROOT', 'PYTHONPATH=/opt/sitescripts'],
5 }
6
7 class {'ssh':
8 custom_configuration => 'Match User rsync
9 AllowTcpForwarding no
10 X11Forwarding no
11 AllowAgentForwarding no
12 GatewayPorts no
13 ForceCommand rsync --server --sender -vltprz --delete-excluded . /home/rsync /subscriptions/files/subscriptions'
14 }
15
16 user {'rsync':
17 ensure => present,
18 comment => 'Filter list mirror user',
19 home => '/home/rsync',
20 managehome => true
21 }
22
23 file {'/home/rsync/.ssh':
24 ensure => directory,
25 require => User['rsync'],
26 owner => rsync,
27 mode => 0600
28 }
29
30 file {'/home/rsync/.ssh/authorized_keys':
31 ensure => file,
32 require => [
33 File['/home/rsync/.ssh'],
34 User['rsync']
35 ],
36 owner => rsync,
37 mode => 0600,
38 source => 'puppet:///modules/filtermaster/authorized_keys'
39 }
40
41 define repo_download( ) {
42 exec { "fetch_${title}":
43 command => "hg clone https://hg.adblockplus.org/${title} /home/rsync/subs cription/${title}",
44 path => ["/usr/bin/", "/bin/"],
45 require => Package['mercurial'],
46 user => rsync,
47 timeout => 0,
48 onlyif => "test ! -d /home/rsync/subscription/${title}"
49 }
50 }
51
52 repo_download {['easylist',
53 'easylistgermany',
54 'easylistitaly',
55 'easylistcombinations',
56 'malwaredomains',
57 'ruadlist',
58 'listefr',
59 'exceptionrules',
60 'easylistdutch',
61 'facebookfilters',
62 'antiadblockfilters'
63 ]:
64 }
65
66 cron {'update_subscription':
67 ensure => present,
68 command => "python -m sitescripts.subscriptions.bin.updateSubscriptionDownlo ads 3>&1 1>/dev/null 2>&3 | perl -pe 's/^/\"[\" . scalar localtime() . \"] \"/e' >> /tmp/subscription_errors && chmod 666 /tmp/subscription_errors 2>/dev/null",
69 user => rsync,
70 require => [
71 User['rsync']
72 ],
73 minute => '*/10'
74 }
75
76 cron {'update_malware':
77 ensure => present,
78 command => "python -m sitescripts.subscriptions.bin.updateMalwareDomainsList ",
79 user => rsync,
80 require => [
81 User['rsync']
82 ],
83 hour => '*/6',
84 minute => 15
85 }
86
87 class {'sitescripts':
88 sitescriptsini_source => 'puppet:///modules/filtermaster/sitescripts'
89 }
90 }
OLDNEW
« no previous file with comments | « modules/filtermaster/files/sitescripts ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld