Skip to content

Commit fe1ff65

Browse files
committed
fix: modern way to get os family
1 parent 4cedf05 commit fe1ff65

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

manifests/params.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# RHEL 6.6 includes automatic sudo configuration
3737
# RHEL 7.0 requires manual confifuration
3838
# RHEL >=7.1 includes automatic sudo configuration
39-
case $::osfamily {
39+
case $facts['os']['family'] {
4040
'RedHat': {
4141
case $::operatingsystem {
4242
'Fedora': {
@@ -74,12 +74,12 @@
7474
}
7575
}
7676
default: {
77-
fail("This module does not support operatingsystem ${::operatingsystem}")
77+
fail("This module does not support os family " + facts['os']['family'])
7878
}
7979
}
8080

8181
# Name of IPA package to install
82-
case $::osfamily {
82+
case $facts['os']['family'] {
8383
'RedHat': {
8484
case $::operatingsystem {
8585
'fedora': {
@@ -94,7 +94,7 @@
9494
$package = 'freeipa-client'
9595
}
9696
default: {
97-
fail("This module does not support operatingsystem ${::operatingsystem}")
97+
fail("This module does not support os family " + $facts['os']['family'])
9898
}
9999
}
100100
}

manifests/sudoers.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
if !empty($server) and !empty($domain) {
3434
$realm = upcase($domain)
3535

36-
case $::osfamily {
36+
case $facts['os']['family'] {
3737
'RedHat': {
3838

3939
if ($::operatingsystem == 'Fedora' and

0 commit comments

Comments
 (0)