From 5439dccf9dad1217a03506b15b5ec9899eb468cf Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Sun, 7 Jun 2020 14:22:43 +0200 Subject: [PATCH] changes params structure --- manifests/main/install.pp | 17 +++++++++++++++-- manifests/params.pp | 3 +++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/manifests/main/install.pp b/manifests/main/install.pp index ff59cfc..0f04ee3 100644 --- a/manifests/main/install.pp +++ b/manifests/main/install.pp @@ -27,7 +27,20 @@ class cd_fail2ban::main::install ( require cd_resources - package {$reqpackages: - ensure => $pkg_ensure, + if $::operatingsystemmajrelease != '8' { + package {$reqpackages: + ensure => $pkg_ensure, + } + } + + if $::operatingsystemmajrelease == '8' { + package {$fn_extra_repo_url: + ensure => present, + + package {$reqpackages: + ensure => $pkg_ensure, + require => Package[$fn_extra_repo_url], + } + } } } diff --git a/manifests/params.pp b/manifests/params.pp index 880144a..5f52b61 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -127,6 +127,9 @@ $reqpackages = ['fail2ban','fail2ban-firewalld', 'fail2ban-sendmail','fail2ban-server.noarch', 'whois'], +# urls +$fn_extra_repo_url = 'http://repo.okay.com.mx/centos/8/x86_64/release/okay-release-1-1.noarch.rpm' + $fn_manage_config = true, $fn_enable_service = 'running',