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: Fix it Created Nov. 13, 2013, 2: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 | « modules/filtermaster/files/update_repos.sh ('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 /generated/data/'
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/update_repos.sh':
24 ensure => file,
25 owner => rsync,
26 mode => 0700,
27 source => 'puppet:///modules/filtermaster/update_repos.sh'
28 }
29
30 file {'/home/rsync/.ssh':
31 ensure => directory,
32 owner => rsync,
33 mode => 0600
34 }
35
36 file {'/home/rsync/subscription':
37 ensure => directory,
38 owner => rsync
39 }
40
41 file {'/home/rsync/generated':
42 ensure => directory,
43 owner => rsync
44 }
45
46 file {'/home/rsync/.ssh/authorized_keys':
47 ensure => file,
48 owner => rsync,
49 mode => 0600,
50 source => 'puppet:///modules/filtermaster/authorized_keys'
51 }
52
53 package {['p7zip-full']:}
54
55 define repo_download( ) {
56 exec { "fetch_${title}":
57 command => "hg clone https://hg.adblockplus.org/${title} /home/rsync/subs cription/${title}",
58 path => ["/usr/bin/", "/bin/"],
59 require => Package['mercurial'],
60 user => rsync,
61 timeout => 0,
62 onlyif => "test ! -d /home/rsync/subscription/${title}"
63 }
64 }
65
66 repo_download {['easylist',
67 'easylistgermany',
68 'easylistitaly',
69 'easylistcombinations',
70 'malwaredomains',
71 'ruadlist',
72 'listefr',
73 'exceptionrules',
74 'easylistdutch',
75 'facebookfilters',
76 'antiadblockfilters'
77 ]:
78 }
79
80 cron {'update_subscription':
81 ensure => present,
82 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",
83 user => rsync,
84 require => [
85 User['rsync']
86 ],
87 minute => '*/10'
88 }
89
90 cron {'update_malware':
91 ensure => present,
92 command => "python -m sitescripts.subscriptions.bin.updateMalwareDomainsList ",
93 user => rsync,
94 require => [
95 User['rsync']
96 ],
97 hour => '*/6',
98 minute => 15
99 }
100
101 cron {'update_repos':
102 ensure => present,
103 command => "/home/rsync/update_repos.sh",
104 user => rsync,
105 require => [
106 User['rsync'],
107 File['/home/rsync/update_repos.sh']
108 ],
109 minute => '8-58/10'
110 }
111
112 class {'sitescripts':
113 sitescriptsini_source => 'puppet:///modules/filtermaster/sitescripts'
114 }
115 }
OLDNEW
« no previous file with comments | « modules/filtermaster/files/update_repos.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld