Decommission ubc-bl*.debian.org
[mirror/dsa-puppet.git] / modules / multipath / manifests / init.pp
1 # = Class: multipath
2 #
3 # Manage a multipath installation
4 #
5 # == Sample Usage:
6 #
7 #   include multipath
8 #
9 class multipath {
10         case $::hostname {
11                 bm-bl1,bm-bl2,bm-bl3,bm-bl4,bm-bl5,bm-bl6,bm-bl7,bm-bl8,bm-bl9,bm-bl10,bm-bl11,bm-bl12,bm-bl13,bm-bl14: {
12                         $conffile = 'multipath-bm.conf'
13                 }
14                 ubc-enc2bl01,ubc-enc2bl02,ubc-enc2bl09,ubc-enc2bl10: {
15                         $conffile = 'multipath-ubc-ganeti2.conf'
16                 }
17                 default: {
18                         $conffile = ''
19                 }
20         }
21
22         if $conffile != '' {
23                 package { 'multipath-tools':
24                         ensure => installed,
25                 }
26                 exec { 'multipath reload':
27                         path        => '/usr/bin:/usr/sbin:/bin:/sbin',
28                         command     => 'service multipath-tools reload',
29                         refreshonly => true,
30                         require     =>  Package['multipath-tools'],
31                 }
32
33                 file { '/etc/multipath.conf':
34                         content  => template("multipath/${conffile}.erb"),
35                         notify  => Exec['multipath reload']
36                 }
37         }
38 }