]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/multipath/manifests/init.pp
multipath config, II
[dsa-puppet.git] / modules / multipath / manifests / init.pp
1 class multipath {
2         case $::hostname {
3                 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: {
4                         $conffile = 'bm-multipath.conf'
5                 }
6                 default: {
7                         $conffile = ''
8                 }
9         }
10
11         if $conffile != '' {
12                 package { 'multipath-tools':
13                         ensure => installed,
14                 }
15                 exec { 'multipath reload':
16                         path        => '/usr/bin:/usr/sbin:/bin:/sbin',
17                         command     => 'service multipath-tools reload',
18                         refreshonly => true,
19                         require =>  Package['multipath-tools'],
20                 }
21
22                 file { '/etc/multipath.conf':
23                         source  => "puppet:///modules/multipath/$conffile",
24                         notify  => Exec['multipath reload']
25                 }
26         }
27 }