From 62aa587bfb64c1fcba4f96fa0d6553f37a252fa9 Mon Sep 17 00:00:00 2001 From: Lennart Betz Date: Sun, 25 Feb 2024 17:01:49 +0100 Subject: [PATCH] Remove combat repo file names --- manifests/repos/apt.pp | 8 +------- manifests/repos/yum.pp | 8 +------- manifests/repos/zypper.pp | 6 ------ 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/manifests/repos/apt.pp b/manifests/repos/apt.pp index b1cd5c2..beac7f3 100644 --- a/manifests/repos/apt.pp +++ b/manifests/repos/apt.pp @@ -18,11 +18,6 @@ Apt::Source['backports'] -> Package <| title != 'apt-transport-https' |> } - # fix issue 21, 33 - file { ['/etc/apt/sources.list.d/netways-plugins.list', '/etc/apt/sources.list.d/netways-extras.list']: - ensure => 'absent', - } - $repos.each |String $repo_name, Hash $repo_config| { if $managed[$repo_name] { if $repo_config['key'] and !$repo_config['key']['id'] { @@ -34,8 +29,7 @@ Apt::Source[$repo_name] -> Package <| title != 'apt-transport-https' |> apt::source { $repo_name: - * => { ensure => present } + $_repo_config, - require => File['/etc/apt/sources.list.d/netways-plugins.list', '/etc/apt/sources.list.d/netways-extras.list'], + * => { ensure => present } + $_repo_config, } } } diff --git a/manifests/repos/yum.pp b/manifests/repos/yum.pp index 34d8802..07764f5 100644 --- a/manifests/repos/yum.pp +++ b/manifests/repos/yum.pp @@ -24,17 +24,11 @@ warning("Repository CRB isn't available on ${facts['os']['name']} ${facts['os']['release']['major']}.") } - # fix issue 21, 33 - file { ['/etc/yum.repos.d/netways-plugins.repo', '/etc/yum.repos.d/netways-extras.repo']: - ensure => 'absent', - } - $repos.each |String $repo_name, Hash $repo_config| { if $repo_name in keys($managed) and $managed[$repo_name] { Yumrepo[$repo_name] -> Package <| |> yumrepo { $repo_name: - * => $repo_config, - require => File['/etc/yum.repos.d/netways-plugins.repo', '/etc/yum.repos.d/netways-extras.repo'], + * => $repo_config, } } } diff --git a/manifests/repos/zypper.pp b/manifests/repos/zypper.pp index 40b21d5..89d10a9 100644 --- a/manifests/repos/zypper.pp +++ b/manifests/repos/zypper.pp @@ -9,11 +9,6 @@ $repos = $icinga::repos::list $managed = $icinga::repos::managed - # fix issue 21, 33 - file { ['/etc/zypp/repos.d/netways-plugins.repo', '/etc/zypp/repos.d/netways-extras.repo']: - ensure => 'absent', - } - $repos.each |String $repo_name, Hash $repo_config| { if $repo_name in keys($managed) and $managed[$repo_name] { if $repo_config['proxy'] { @@ -31,7 +26,6 @@ -> zypprepo { $repo_name: * => delete($repo_config, 'proxy'), - require => File['/etc/zypp/repos.d/netways-plugins.repo', '/etc/zypp/repos.d/netways-extras.repo'], } -> file_line { "add proxy settings to ${repo_name}":