class ups( $include = hiera('nodo::ups::include', false), $type = hiera('nodo::ups::type', 'usb'), $cable = hiera('nodo::ups::cable', 'usb'), $dev = hiera('nodo::ups::dev', '/dev/usb/hiddev0'), $nisip = hiera('nodo::ups::nisip', '127.0.0.1'), $polltime = hiera('nodo::ups::polltime', '60'), $onbatterydelay = hiera('nodo::ups::onbatterydelay', '6'), $batterylevel = hiera('nodo::ups::batterylevel', '5'), $minutes = hiera('nodo::ups::minutes', '3' ) { case $include { true: { class { "apcupsd": upstype => $type, cable => $cable, device => $dev, nisip => $nisip, polltime => $polltime, onbatterydelay => $onbatterydelay, batterylevel => $batterylevel, minutes => $minutes, } } } }