Merge remote-tracking branch 'origin/master' into staging
[mirror/dsa-puppet.git] / modules / haproxy / manifests / init.pp
diff --git a/modules/haproxy/manifests/init.pp b/modules/haproxy/manifests/init.pp
new file mode 100644 (file)
index 0000000..b9bdf10
--- /dev/null
@@ -0,0 +1,23 @@
+class haproxy {
+       package { 'haproxy':
+               ensure => installed,
+       }
+       service { 'haproxy':
+               ensure => running,
+               require => Package['haproxy'],
+       }
+
+       file { '/usr/local/bin/munin-haproxyng':
+               mode => '0555',
+               source => "puppet:///modules/haproxy/monitoring-munin-haproxy/haproxyng",
+       }
+       package { 'libswitch-perl':
+               ensure => installed,
+       }
+       file { '/etc/munin/plugin-conf.d/puppet-haproxyng':
+               source => "puppet:///modules/haproxy/munin-haproxyng.conf",
+       }
+       munin::check { "haproxyng":
+               script => "../../../local/bin/munin-haproxyng",
+       }
+}