+++ /dev/null
-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,
- }
- }
-}
class hardware {
- if $::smartarraycontroller {
- include debian-org::proliant
- }
-
- if $::productname == 'PowerEdge 2850' {
- include megactl
- }
-
- if $::mptraid {
- include raidmpt
- }
-
+ include hardware::raid
}
--- /dev/null
+class hardware::raid {
+ if $::smartarraycontroller {
+ include hardware::raid::proliant
+ }
+
+ if $::productname == 'PowerEdge 2850' {
+ include hardware::raid::megactl
+ }
+
+ if $::mptraid {
+ include hardware::raid::raidmpt
+ }
+
+}
--- /dev/null
+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',
+ }
+}
--- /dev/null
+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,
+ }
+ }
+}
--- /dev/null
+# = 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,
+ }
+}
+++ /dev/null
-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',
- }
-}
+++ /dev/null
-# = 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,
- }
-}