Skip to content

Commit

Permalink
replace legacy-facts with modern ones
Browse files Browse the repository at this point in the history
  • Loading branch information
sircubbi committed Aug 31, 2023
1 parent 69b48d9 commit 7b52e2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down
4 changes: 2 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#
class bind::params {

case $::osfamily {
case $facts['os']['family'] {
'RedHat': {
$packagenameprefix = 'bind'
$servicename = 'named'
$binduser = 'root'
$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'
Expand Down

0 comments on commit 7b52e2a

Please sign in to comment.