]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/multipath/manifests/init.pp
prepare to add salieri to ganeti2
[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 = 'multipath-bm.conf'
5                 }
6                 dijkstra,luchesi,rossini,salieri: {
7                         $conffile = 'multipath-ubc-ganeti.conf'
8                 }
9                 default: {
10                         $conffile = ''
11                 }
12         }
13
14         if $conffile != '' {
15                 package { 'multipath-tools':
16                         ensure => installed,
17                 }
18                 exec { 'multipath reload':
19                         path        => '/usr/bin:/usr/sbin:/bin:/sbin',
20                         command     => 'service multipath-tools reload',
21                         refreshonly => true,
22                         require =>  Package['multipath-tools'],
23                 }
24
25                 file { '/etc/multipath.conf':
26                         source  => "puppet:///modules/multipath/$conffile",
27                         notify  => Exec['multipath reload']
28                 }
29         }
30 }