| Index: modules/notificationserver/manifests/init.pp | 
| diff --git a/modules/notificationserver/manifests/init.pp b/modules/notificationserver/manifests/init.pp | 
| index 1d7eaf21f3a8602783bf6a8078647c6cd5a6cfa6..235d64a2cb80569b1eb5ed20da5be536d707676f 100644 | 
| --- a/modules/notificationserver/manifests/init.pp | 
| +++ b/modules/notificationserver/manifests/init.pp | 
| @@ -16,6 +16,25 @@ class notificationserver($is_default = false) { | 
| onlyif => 'test ! -d /opt/notifications' | 
| } | 
| + # http://hub.eyeo.com/issues/3927 | 
| + $clear_cache = "find /var/cache/nginx/notification -type f -exec rm -rf {} +" | 
| + | 
| + # https://linux.die.net/man/5/sudoers | 
| + file {"/etc/sudoers.d/notification-cache": | 
| + content => "nginx ALL=(www-data) NOPASSWD:/usr/bin/$clear_cache\n", | 
| 
 
f.nicolaisen
2017/09/28 11:05:25
Consider extracting 'www-data' here and below to m
 
mathias
2017/09/28 12:00:00
Acknowledged.
 
 | 
| + ensure => 'present', | 
| + group => 'root', | 
| + mode => '0440', | 
| + owner => 'root', | 
| + } | 
| + | 
| + # https://docs.puppet.com/puppet/latest/types/augeas.html | 
| + augeas {"files/opt/notifications/.hg/hgrc/hooks/cache": | 
| + changes => ["set hooks/changegroup.cache 'sudo -u www-data $clear_cache'"], | 
| + incl => '/opt/notifications/.hg/hgrc', | 
| 
 
f.nicolaisen
2017/09/28 11:05:25
No dependency on the notifications repo having bee
 
mathias
2017/09/28 12:00:00
Acknowledged.
Interestingly we just recently lear
 
 | 
| + lens => "Puppet.lns", | 
| + } | 
| + | 
| cron {'update_notifications': | 
| command => 'hg pull -q -u -R /opt/notifications', | 
| environment => hiera('cron::environment', []), |