Skip to content

Commit

Permalink
use $facts when accessing os fact
Browse files Browse the repository at this point in the history
  • Loading branch information
igalic committed Sep 5, 2019
1 parent d4630a1 commit f6e3c9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
$os['operatingsystem']
}

unless member($supported_os_names, $::os['name']) {
fail("${::os['name']} not supported")
unless member($supported_os_names, $facts['os']['name']) {
fail("${facts['os']['name']} not supported")
}

$_managed_repos = $manage_os_default_repos ? {
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
if $pkg_prefix {
$_pkg_prefix = $pkg_prefix
} else {
$_pkg_prefix = $::os['release']['major'] ? {
$_pkg_prefix = $facts['os']['release']['major'] ? {
Variant[Integer[5,5], Enum['5']] => 'yum',
default => 'yum-plugin',
}
Expand Down

0 comments on commit f6e3c9b

Please sign in to comment.