From da4b8011cf13ad30dc4c431b24957846353fbc89 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 26 Sep 2014 18:04:11 -0300 Subject: Adding nodo::physical::sdb config --- manifests/base/physical.pp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'manifests/base') diff --git a/manifests/base/physical.pp b/manifests/base/physical.pp index eae94a4..45648ee 100644 --- a/manifests/base/physical.pp +++ b/manifests/base/physical.pp @@ -6,14 +6,28 @@ class nodo::base::physical inherits nodo::base::host { if $munin == true { include munin::plugins::smart + # TODO: use nodo::physical::disks instead + $sdb = hiera('nodo::physical::sdb', false) + $disks = $sdb ? { + true => 'sda sdb', + default => 'sda', + } + + munin::plugin { 'hddtemp_smartctl': + ensure => present, + config => "user root\ngroup disk\nenv.drives ${disks}", + } + munin::plugin { 'smart_sda': ensure => 'smart_', config => "user root\ngroup disk", } - munin::plugin { 'hddtemp_smartctl': - ensure => present, - config => "user root\ngroup disk\nenv.drives sda", + if $sdb == true { + munin::plugin { 'smart_sdb': + ensure => 'smart_', + config => "user root\ngroup disk", + } } package { 'lm-sensors': -- cgit v1.2.3