From ef54fcc93af6f77fa5ab4b75914ab2fc071de40a Mon Sep 17 00:00:00 2001 From: Matt Dainty Date: Tue, 13 Oct 2020 12:52:03 +0100 Subject: [PATCH] Test against OS family rather than name This then includes proper RHEL as well as CentOS. --- manifests/init.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 30303a34..ab814bf4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -483,8 +483,8 @@ } } - if ($facts['os']['name'] == 'CentOS') and (versioncmp($facts['os']['release']['major'], '7') < 0) { - fail(translate('This module only works on CentOS version 7 and higher based systems.')) + if ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '7') < 0) { + fail(translate('This module only works on Red Hat based systems version 7 and higher.')) } if ($default_gateway) and (!$bridge) {