]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/varnish/manifests/init.pp
include better firewall rules
[dsa-puppet.git] / modules / varnish / manifests / init.pp
index 036530ab7d3f13841f503e6cb59c7064f9f3524a..ca204a718c4ec353d82b0b71cf947c1c52d0588d 100644 (file)
@@ -8,20 +8,26 @@ class varnish {
                 ensure => running,
         }
 
+       include apache2::dynamic
+
         @ferm::rule { 'dsa-varnish':
                 domain      => '(ip ip6)',
                 description => 'Allow http access',
-                rule        => '&TCP_SERVICE(80)'
+               rule        => '&SERVICE(tcp, 80)'
         }
 
         file { '/etc/default/varnish':
-               source => 'puppet:///modules/varnish/files/varnish.default',
-                notify => Exec['varnish restart'],
+               source  => 'puppet:///modules/varnish/varnish.default',
+               require =>  Package['varnish'],
+                notify  =>  Service['varnish'],
+               mode    => '0444',
         }
 
         file { '/etc/varnish/default.vcl':
-               source => 'puppet:///modules/varnish/files/default.vcl',
-                notify => Exec['varnish restart'],
+               source => 'puppet:///modules/varnish/default.vcl',
+               require =>  Package['varnish'],
+               notify =>  Service['varnish'],
+               mode    => '0444',
         }
 }