From 3f8205cce696544896df36afeeafed2bf45fd74c Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Thu, 11 Jul 2013 17:40:43 +0300 Subject: [PATCH] Initial version of raid module --- {custom => raid}/lib/facter/raid.rb | 0 raid/manifests/init.pp | 33 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) rename {custom => raid}/lib/facter/raid.rb (100%) create mode 100644 raid/manifests/init.pp diff --git a/custom/lib/facter/raid.rb b/raid/lib/facter/raid.rb similarity index 100% rename from custom/lib/facter/raid.rb rename to raid/lib/facter/raid.rb diff --git a/raid/manifests/init.pp b/raid/manifests/init.pp new file mode 100644 index 0000000..c5e09b0 --- /dev/null +++ b/raid/manifests/init.pp @@ -0,0 +1,33 @@ +# Install tools for detected raid controllers. +# +class raid::tools { + + if $::raid { + $controllers = split($::raid, ',') + + if "smartarray" in $controllers { + include raid::tools::smartarray + } + } + +} + + +# Install HP SmartArray tools. +# +class raid::tools::smartarray { + + case $::operatingsystem { + "centos","redhat": { + include yum::repo::hpspp + package { "hpacucli": + ensure => installed, + require => Yum::Repo["hpspp"], + } + } + default: { + fail("raid::tools::smartarray not supported in ${::operatingsystem}") + } + } + +}