]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
reorder hardware modules
authorStephen Gran <steve@lobefin.net>
Thu, 3 May 2012 06:39:38 +0000 (07:39 +0100)
committerStephen Gran <steve@lobefin.net>
Thu, 3 May 2012 06:39:38 +0000 (07:39 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/debian-org/manifests/proliant.pp [deleted file]
modules/hardware/manifests/init.pp
modules/hardware/manifests/raid.pp [new file with mode: 0644]
modules/hardware/manifests/raid/megactl.pp [new file with mode: 0644]
modules/hardware/manifests/raid/proliant.pp [new file with mode: 0644]
modules/hardware/manifests/raid/raidmpt.pp [new file with mode: 0644]
modules/megactl/manifests/init.pp [deleted file]
modules/raidmpt/manifests/init.pp [deleted file]

diff --git a/modules/debian-org/manifests/proliant.pp b/modules/debian-org/manifests/proliant.pp
deleted file mode 100644 (file)
index 28a177b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-class debian-org::proliant {
-
-       site::aptrepo { 'debian.restricted':
-               url        => 'http://db.debian.org/debian-admin',
-               suite      => 'lenny-restricted',
-               components => 'non-free',
-       }
-
-       package { 'hpacucli':
-               ensure  => installed,
-               require => [
-                       File['/etc/apt/sources.list.d/debian.restricted.list'],
-                       Exec['apt-get update']
-               ]
-       }
-       package { 'hp-health':
-               ensure => installed,
-               require => [
-                       File['/etc/apt/sources.list.d/debian.restricted.list'],
-                       Exec['apt-get update']
-               ]
-       }
-       package { 'arrayprobe':
-               ensure => installed,
-       }
-
-       if $::debarchitecture == 'amd64' {
-               package { 'lib32gcc1':
-                       ensure => installed,
-               }
-       }
-}
index e87de20581c0133f1482beab610694b1cf2c4b22..4865c9e41dc7b82c2d8694b1cac3efbe204fe3d3 100644 (file)
@@ -1,14 +1,3 @@
 class hardware {
-       if $::smartarraycontroller {
-               include debian-org::proliant
-       }
-
-       if $::productname == 'PowerEdge 2850' {
-               include megactl
-       }
-
-       if $::mptraid {
-               include raidmpt
-       }
-
+       include hardware::raid
 }
diff --git a/modules/hardware/manifests/raid.pp b/modules/hardware/manifests/raid.pp
new file mode 100644 (file)
index 0000000..3affb89
--- /dev/null
@@ -0,0 +1,14 @@
+class hardware::raid {
+       if $::smartarraycontroller {
+               include hardware::raid::proliant
+       }
+
+       if $::productname == 'PowerEdge 2850' {
+               include hardware::raid::megactl
+       }
+
+       if $::mptraid {
+               include hardware::raid::raidmpt
+       }
+
+}
diff --git a/modules/hardware/manifests/raid/megactl.pp b/modules/hardware/manifests/raid/megactl.pp
new file mode 100644 (file)
index 0000000..9c7ec4b
--- /dev/null
@@ -0,0 +1,16 @@
+class hardware::raid::megactl {
+
+       package { 'megactl':
+               ensure => installed,
+               require => [
+                       File['/etc/apt/sources.list.d/debian.restricted.list'],
+                       Exec['apt-get update']
+               ]
+       }
+
+       site::aptrepo { 'debian.restricted':
+               url        => 'http://db.debian.org/debian-admin',
+               suite      => 'lenny-restricted',
+               components => 'non-free',
+       }
+}
diff --git a/modules/hardware/manifests/raid/proliant.pp b/modules/hardware/manifests/raid/proliant.pp
new file mode 100644 (file)
index 0000000..574d601
--- /dev/null
@@ -0,0 +1,32 @@
+class hardware::raid::proliant {
+
+       site::aptrepo { 'debian.restricted':
+               url        => 'http://db.debian.org/debian-admin',
+               suite      => 'lenny-restricted',
+               components => 'non-free',
+       }
+
+       package { 'hpacucli':
+               ensure  => installed,
+               require => [
+                       File['/etc/apt/sources.list.d/debian.restricted.list'],
+                       Exec['apt-get update']
+               ]
+       }
+       package { 'hp-health':
+               ensure => installed,
+               require => [
+                       File['/etc/apt/sources.list.d/debian.restricted.list'],
+                       Exec['apt-get update']
+               ]
+       }
+       package { 'arrayprobe':
+               ensure => installed,
+       }
+
+       if $::debarchitecture == 'amd64' {
+               package { 'lib32gcc1':
+                       ensure => installed,
+               }
+       }
+}
diff --git a/modules/hardware/manifests/raid/raidmpt.pp b/modules/hardware/manifests/raid/raidmpt.pp
new file mode 100644 (file)
index 0000000..c512913
--- /dev/null
@@ -0,0 +1,24 @@
+# = Class: hardware::raid::raidmpt
+#
+# This class installs mpt-status and ensures the daemon is not running
+#
+# == Sample Usage:
+#
+#   include hardware::raid::raidmpt
+#
+class hardware::raid::raidmpt {
+
+       package { 'mpt-status':
+               ensure => installed
+       }
+
+       file { '/etc/default/mpt-statusd':
+               content => "# This file is under puppet control\nRUN_DAEMON=no\n",
+               notify  => Exec['mpt-statusd-stop'],
+       }
+
+       exec { 'mpt-statusd-stop':
+               command => 'pidfile=/var/run/mpt-statusd.pid; ! [ -e "$pidfile" ] || /sbin/start-stop-daemon --oknodo --stop --signal TERM --quiet --pidfile "$pidfile"; rm -f "$pidfile";  pkill -INT  -P 1 -u 0 -f "/usr/bin/daemon /etc/init.d/mpt-statusd check_mpt"',
+               refreshonly => true,
+       }
+}
diff --git a/modules/megactl/manifests/init.pp b/modules/megactl/manifests/init.pp
deleted file mode 100644 (file)
index 252b418..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-class megactl {
-       package { 'megactl':
-               ensure => installed,
-               require => [
-                       File['/etc/apt/sources.list.d/debian.restricted.list'],
-                       Exec['apt-get update']
-               ]
-       }
-
-       site::aptrepo { 'debian.restricted':
-               url        => 'http://db.debian.org/debian-admin',
-               suite      => 'lenny-restricted',
-               components => 'non-free',
-       }
-}
diff --git a/modules/raidmpt/manifests/init.pp b/modules/raidmpt/manifests/init.pp
deleted file mode 100644 (file)
index 2d84af1..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# = Class: raidmpt
-#
-# This class installs mpt-status and ensures the daemon is not running
-#
-# == Sample Usage:
-#
-#   include raidmpt
-#
-class raidmpt {
-
-       package { 'mpt-status':
-               ensure => installed
-       }
-
-       file { '/etc/default/mpt-statusd':
-               content => "# This file is under puppet control\nRUN_DAEMON=no\n",
-               notify  => Exec['mpt-statusd-stop'],
-       }
-
-       exec { 'mpt-statusd-stop':
-               command => 'pidfile=/var/run/mpt-statusd.pid; ! [ -e "$pidfile" ] || /sbin/start-stop-daemon --oknodo --stop --signal TERM --quiet --pidfile "$pidfile"; rm -f "$pidfile";  pkill -INT  -P 1 -u 0 -f "/usr/bin/daemon /etc/init.d/mpt-statusd check_mpt"',
-               refreshonly => true,
-       }
-}