rename varnish to varnish_pkgmirror module
[mirror/dsa-puppet.git] / modules / varnish-pkgmirror / manifests / init.pp
1 class varnish_pkgmirror {
2
3         package { 'varnish':
4                 ensure => installed,
5         }
6
7         service { 'varnish':
8                 ensure => running,
9         }
10
11         include apache2::dynamic
12
13         @ferm::rule { 'dsa-varnish':
14                 domain      => '(ip ip6)',
15                 prio        => '100',
16                 description => 'Allow http access',
17                 rule        => '&SERVICE(tcp, 80)'
18         }
19
20         file { '/etc/default/varnish':
21                 source  => 'puppet:///modules/varnish_pkgmirror/varnish.default',
22                 require =>  Package['varnish'],
23                 notify  =>  Service['varnish'],
24                 mode    => '0444',
25         }
26
27         file { '/etc/varnish/default.vcl':
28                 source => 'puppet:///modules/varnish_pkgmirror/default.vcl',
29                 require =>  Package['varnish'],
30                 notify =>  Service['varnish'],
31                 mode    => '0444',
32         }
33         file { '/var/lib/varnish/.nobackup':
34                 ensure  => present,
35                 content => "",
36                 require =>  Package['varnish'],
37                 mode    => '0444',
38         }
39
40         file { '/etc/logrotate.d/varnish':
41                 source => 'puppet:///modules/varnish_pkgmirror/varnish.logrotate',
42                 require =>  Package['varnish'],
43                 mode    => '0444',
44         }
45 }
46