diff --git a/manifests/init.pp b/manifests/init.pp index 12a45581..0d4824be 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -28,8 +28,8 @@ if $chroot == true { $packagenamesuffix = '-chroot' # Different service name with chroot on RHEL7+) - if $::osfamily == 'RedHat' and - versioncmp($::operatingsystemrelease, '7') >= 0 { + if $facts['os']['family'] == 'RedHat' and + versioncmp($facts['os']['release']['major'], '7') >= 0 { $servicenamesuffix = '-chroot' } else { $servicenamesuffix = '' diff --git a/manifests/params.pp b/manifests/params.pp index 17a0caf2..2d90578d 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -2,7 +2,7 @@ # class bind::params { - case $::osfamily { + case $facts['os']['family'] { 'RedHat': { $packagenameprefix = 'bind' $servicename = 'named' @@ -10,7 +10,7 @@ $bindgroup = 'named' $file_hint = 'named.ca' $file_rfc1912 = '/etc/named.rfc1912.zones' - if versioncmp($::operatingsystemrelease, '8') >= 0 { + if versioncmp($facts['os']['release']['major'], '8') >= 0 { $file_bindkeys = '/etc/named.root.key' } else { $file_bindkeys = '/etc/named.iscdlv.key'