From 40ccbb8afd9beaa8f41ee20d19aabe13dcd4f509 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Thu, 3 May 2012 07:39:38 +0100 Subject: [PATCH] reorder hardware modules Signed-off-by: Stephen Gran --- modules/hardware/manifests/init.pp | 13 +------------ modules/hardware/manifests/raid.pp | 14 ++++++++++++++ .../init.pp => hardware/manifests/raid/megactl.pp} | 3 ++- .../manifests/raid}/proliant.pp | 2 +- .../init.pp => hardware/manifests/raid/raidmpt.pp} | 6 +++--- 5 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 modules/hardware/manifests/raid.pp rename modules/{megactl/manifests/init.pp => hardware/manifests/raid/megactl.pp} (90%) rename modules/{debian-org/manifests => hardware/manifests/raid}/proliant.pp (94%) rename modules/{raidmpt/manifests/init.pp => hardware/manifests/raid/raidmpt.pp} (85%) diff --git a/modules/hardware/manifests/init.pp b/modules/hardware/manifests/init.pp index e87de2058..4865c9e41 100644 --- a/modules/hardware/manifests/init.pp +++ b/modules/hardware/manifests/init.pp @@ -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 index 000000000..3affb8983 --- /dev/null +++ b/modules/hardware/manifests/raid.pp @@ -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/megactl/manifests/init.pp b/modules/hardware/manifests/raid/megactl.pp similarity index 90% rename from modules/megactl/manifests/init.pp rename to modules/hardware/manifests/raid/megactl.pp index 252b418e3..9c7ec4bfd 100644 --- a/modules/megactl/manifests/init.pp +++ b/modules/hardware/manifests/raid/megactl.pp @@ -1,4 +1,5 @@ -class megactl { +class hardware::raid::megactl { + package { 'megactl': ensure => installed, require => [ diff --git a/modules/debian-org/manifests/proliant.pp b/modules/hardware/manifests/raid/proliant.pp similarity index 94% rename from modules/debian-org/manifests/proliant.pp rename to modules/hardware/manifests/raid/proliant.pp index 28a177b4a..574d601e7 100644 --- a/modules/debian-org/manifests/proliant.pp +++ b/modules/hardware/manifests/raid/proliant.pp @@ -1,4 +1,4 @@ -class debian-org::proliant { +class hardware::raid::proliant { site::aptrepo { 'debian.restricted': url => 'http://db.debian.org/debian-admin', diff --git a/modules/raidmpt/manifests/init.pp b/modules/hardware/manifests/raid/raidmpt.pp similarity index 85% rename from modules/raidmpt/manifests/init.pp rename to modules/hardware/manifests/raid/raidmpt.pp index 2d84af155..c512913ec 100644 --- a/modules/raidmpt/manifests/init.pp +++ b/modules/hardware/manifests/raid/raidmpt.pp @@ -1,12 +1,12 @@ -# = Class: raidmpt +# = Class: hardware::raid::raidmpt # # This class installs mpt-status and ensures the daemon is not running # # == Sample Usage: # -# include raidmpt +# include hardware::raid::raidmpt # -class raidmpt { +class hardware::raid::raidmpt { package { 'mpt-status': ensure => installed -- 2.20.1