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

Side by Side Diff: modules/adblockplus/manifests/telemetry/endpoint.pp

Issue 29329669: Issue 3261 - Introduce module adblockplus::telemetry (Closed)
Patch Set: Issue 3261 - Fix adblockplus::telemetry documentation typos Created Nov. 11, 2015, 6:15 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
(Empty)
1 # == Type: adblockplus::telemetry::endpoint
2 #
3 # Manage POST endoints of the $adblockplus::telemetry::domain.
4 #
5 # === Parameters:
6 #
7 # [*ensure*]
8 # Whether the endpoint should be 'present' or 'absent'/'purged'.
9 #
10 # [*location*]
11 # The path to the endpoint within the $adblockplus::telemtry::domain,
12 # i.e. https://telemetry.adblockplus.org/$location (defaults to /$name).
13 #
14 # [*name*]
15 # Identifies the data file (i.e. /var/log/nginx/telemetry_log_$name).
16 #
17 # === Examples:
18 #
19 # adblockplus::telemetry::endpoint {'filter-hit-statistics':
20 # ensure = 'present',
21 # location = '/submit/filter-hit-statistics',
22 # }
23 #
24 define adblockplus::telemetry::endpoint (
25 $ensure = 'present',
26 $location = "/$name",
27 ) {
28
29 include adblockplus::telemetry
30 include nginx
31
32 $ensure_presence = $ensure ? {
33 /^(absent|purged)$/ => 'absent',
34 default => 'present',
35 }
36
37 $id = "adblockplus::telemetry::endpoint#$name"
38 $logfile = "/var/log/nginx/telemetry_log_$name"
39
40 concat::fragment {$id:
41 content => template('adblockplus/telemetry/endpoint.conf.erb'),
42 ensure => $ensure_presence,
43 notify => Service['nginx'],
44 order => 4,
45 target => $adblockplus::telemetry::endpoints_config_name,
46 }
47
48 logrotate::config {$id:
49 content => template('adblockplus/telemetry/logrotate.erb'),
50 ensure => $ensure_presence,
51 name => "telemetry_$name",
52 }
53 }
OLDNEW
« no previous file with comments | « modules/adblockplus/manifests/telemetry.pp ('k') | modules/adblockplus/templates/telemetry/endpoint.conf.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld