]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
multipath config
authorPeter Palfrader <peter@palfrader.org>
Sat, 13 Apr 2013 22:07:14 +0000 (00:07 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 13 Apr 2013 22:07:14 +0000 (00:07 +0200)
manifests/site.pp
modules/multipath/files/bm-multipath.conf [new file with mode: 0644]
modules/multipath/manifests/init.pp [new file with mode: 0644]

index cc0caf1d8225b2054c7c82d63a18126afb555697..bab825db410b304cb1371a1b1bf693774f56143e 100644 (file)
@@ -41,6 +41,10 @@ node default {
                include ganeti2
        }
 
+       if $::hostname in [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] {
+               include multipath
+       }
+
        if $::hostname == 'dinis' {
                include bacula::director
        } else {
diff --git a/modules/multipath/files/bm-multipath.conf b/modules/multipath/files/bm-multipath.conf
new file mode 100644 (file)
index 0000000..62b5982
--- /dev/null
@@ -0,0 +1,24 @@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
+blacklist_exceptions {
+       devnode "cciss!c[0-9]d[0-9]*"
+}
+
+multipaths {
+       multipath {
+               wwid    3600c0ff000d75b58d376655101000000
+               alias   zobel-testlun
+       }
+
+       multipath {
+               wwid    3600c0ff000d75b58409f695101000000
+               alias   milanollo
+       }
+       multipath {
+               wwid    3600c0ff000d75b584e9f695101000000
+               alias   milanollo-srv
+       }
+}
diff --git a/modules/multipath/manifests/init.pp b/modules/multipath/manifests/init.pp
new file mode 100644 (file)
index 0000000..90bf9b9
--- /dev/null
@@ -0,0 +1,27 @@
+class multipath {
+       case $::hostname {
+               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: {
+                       $conffile = 'bm-multipath.conf';
+               }
+               default: {
+                       $conffile = ''
+               }
+       }
+
+       if $conffile != '' {
+               package { 'multipath-tools':
+                       ensure => installed,
+               }
+               exec { 'multipath reload':
+                       path        => '/usr/bin:/usr/sbin:/bin:/sbin',
+                       command     => 'service multipath-tools reload',
+                       refreshonly => true,
+                       require =>  Package['multipath-tools'],
+               }
+
+               file { '/etc/multipath.conf':
+                       source  => "puppet:///modules/multipath/$conffile",
+                       notify  => Exec['multipath reload']
+               }
+       }
+}