From 248cbeb41152515e9a993cda64ae24b0877f22d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ehrby?= Date: Wed, 15 Dec 2021 23:43:41 +0100 Subject: [PATCH] Make RedHat version check respect acknowledge_unsupported_os Make it possible to use this module on unsupported RedHat OSes like Amazon Linux 2 that is in the Red Hat family. --- manifests/init.pp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index f016a081..ee15a03c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -485,10 +485,9 @@ assert_type(Pattern[/^(Debian|RedHat|windows)$/], $facts['os']['family']) |$a, $b| { fail('This module only works on Debian, Red Hat or Windows based systems.') } - } - - if ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '7') < 0) { - fail('This module only works on Red Hat based systems version 7 and higher.') + if ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '7') < 0) { + fail('This module only works on Red Hat based systems version 7 and higher.') + } } if ($default_gateway) and (!$bridge) {