From f6e3c9be7a4d88a2fa841b386f840c55bd4e21f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Gali=C4=87?= Date: Thu, 5 Sep 2019 17:02:18 +0200 Subject: [PATCH] use $facts when accessing os fact --- manifests/init.pp | 4 ++-- manifests/plugin.pp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index e2cee8cb..fd0c8adb 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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 ? { diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 20e2aadf..02be68b9 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -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', }