diff --git a/manifests/target.pp b/manifests/target.pp index 2de3116..65c606e 100644 --- a/manifests/target.pp +++ b/manifests/target.pp @@ -13,10 +13,10 @@ # This MUST be the same of $::nagios::customconfigdir # HINT: Do not mess with default path names... - $customconfigdir = $::nagios_customconfigdir ? { - '' => '/etc/nagios/auto.d', - undef => '/etc/nagios/auto.d', - default => $::nagios_customconfigdir, + $customconfigdir = $::operatingsystem ? { + /(?i:RedHat|Centos|Scientific|Fedora|Amazon|Linux)/ => '/etc/nagios/auto.d', + /(?i:Debian|Ubuntu|Mint)/ => '/etc/nagios3/auto.d', + default => $::nagios_customconfigdir, } # TODO: Find a smarter solution that doesn't requre TopScope Variables