Skip to content

Commit

Permalink
fix #33 NETWAYS repos named the suffix -release by there packages
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Jun 21, 2021
1 parent a2c197d commit 45510b0
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions data/Debian/Ubuntu/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icinga::repos:
location: http://packages.icinga.com/ubuntu
'icinga-snapshot-builds':
location: http://packages.icinga.com/ubuntu
'netways-plugins':
'netways-plugins-release':
location: http://packages.netways.de/plugins/ubuntu
'netways-extras':
'netways-extras-release':
location: http://packages.netways.de/extras/ubuntu
4 changes: 2 additions & 2 deletions data/Debian/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ icinga::repos:
key:
id: F51A91A5EE001AA5D77D53C4C6E319C334410682
source: http://packages.icinga.com/icinga.key
'netways-plugins':
'netways-plugins-release':
location: http://packages.netways.de/plugins/debian
release: '%{facts.os.distro.codename}'
repos: main
key:
id: 0DEE49417F457646CC0C29AD03E3F1C5E8B2FC5E
source: https://packages.netways.de/netways-repo.asc
'netways-extras':
'netways-extras-release':
location: http://packages.netways.de/extras/debian
release: '%{facts.os.distro.codename}'
repos: main
Expand Down
4 changes: 2 additions & 2 deletions data/RedHat/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ icinga::repos:
gpgcheck: 1
gpgkey: https://packages.icinga.com/icinga.key
metadata_expire: 1d
netways-plugins:
netways-plugins-release:
descr: NETWAYS plugins provide some monitoring plugins - Enterprise Linux
baseurl: 'https://packages.netways.de/plugins/epel/$releasever'
enabled: 1
gpgcheck: 1
gpgkey: https://packages.netways.de/netways-repo.asc
netways-extras:
netways-extras-release:
descr: NETWAYS extras provide monitoring extras - Enterprise Linux
baseurl: 'https://packages.netways.de/extras/epel/$releasever'
enabled: 1
Expand Down
12 changes: 6 additions & 6 deletions manifests/repos.pp
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@

$list = lookup('icinga::repos', Hash, 'deep', {})
$managed = {
icinga-stable-release => $manage_stable,
icinga-testing-builds => $manage_testing,
icinga-snapshot-builds => $manage_nightly,
epel => $manage_epel,
netways-plugins => $manage_plugins,
netways-extras => $manage_extras,
icinga-stable-release => $manage_stable,
icinga-testing-builds => $manage_testing,
icinga-snapshot-builds => $manage_nightly,
epel => $manage_epel,
netways-plugins-release => $manage_plugins,
netways-extras-release => $manage_extras,
}

case $::facts['os']['family'] {
Expand Down
6 changes: 3 additions & 3 deletions manifests/repos/apt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
Apt::Source['backports'] -> Package <| |>
}

# fix issue 21
file { ['/etc/apt/sources.list.d/netways-plugins-release.list', '/etc/apt/sources.list.d/netways-extras-release.list']:
# fix issue 21, 33
file { ['/etc/apt/sources.list.d/netways-plugins.list', '/etc/apt/sources.list.d/netways-extras.list']:
ensure => 'absent',
}

Expand All @@ -29,7 +29,7 @@
Apt::Source[$repo_name] -> Package <| |>
apt::source { $repo_name:
* => merge({ ensure => present }, $repo_config),
require => File['/etc/apt/sources.list.d/netways-plugins-release.list', '/etc/apt/sources.list.d/netways-extras-release.list'],
require => File['/etc/apt/sources.list.d/netways-plugins.list', '/etc/apt/sources.list.d/netways-extras.list'],
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions manifests/repos/yum.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
warning("Repository EPEL isn't available on ${facts['os']['name']} ${facts['os']['release']['major']}.")
}

# fix issue 21
file { ['/etc/yum.repos.d/netways-plugins-release.repo', '/etc/yum.repos.d/netways-extras-release.repo']:
# fix issue 21, 33
file { ['/etc/yum.repos.d/netways-plugins.repo', '/etc/yum.repos.d/netways-extras.repo']:
ensure => 'absent',
}

Expand All @@ -25,7 +25,7 @@
Yumrepo[$repo_name] -> Package <| |>
yumrepo { $repo_name:
* => $repo_config,
require => File['/etc/yum.repos.d/netways-plugins-release.repo', '/etc/yum.repos.d/netways-extras-release.repo'],
require => File['/etc/yum.repos.d/netways-plugins.repo', '/etc/yum.repos.d/netways-extras.repo'],
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions manifests/repos/zypper.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
$repos = $::icinga::repos::list
$managed = $::icinga::repos::managed

# fix issue 21
file { ['/etc/zypp/repos.d/netways-plugins-release.repo', '/etc/zypp/repos.d/netways-extras-release.repo']:
# fix issue 21, 33
file { ['/etc/zypp/repos.d/netways-plugins.repo', '/etc/zypp/repos.d/netways-extras.repo']:
ensure => 'absent',
}

Expand All @@ -32,7 +32,7 @@

-> zypprepo { $repo_name:
* => delete($repo_config, 'proxy'),
require => File['/etc/zypp/repos.d/netways-plugins-release.repo', '/etc/zypp/repos.d/netways-extras-release.repo'],
require => File['/etc/zypp/repos.d/netways-plugins.repo', '/etc/zypp/repos.d/netways-extras.repo'],
}

-> file_line { "add proxy settings to ${repo_name}":
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/repos_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@
when 'Debian'
it { is_expected.not_to contain_apt__source('icinga-stable-release') }
it { is_expected.to contain_apt__source('icinga-testing-builds').with('ensure' => 'present') }
it { is_expected.to contain_apt__source('netways-plugins').with('ensure' => 'present') }
it { is_expected.to contain_apt__source('netways-plugins-release').with('ensure' => 'present') }
when 'RedHat'
it { is_expected.not_to contain_yumrepo('icinga-stable-release') }
it { is_expected.to contain_yumrepo('icinga-testing-builds').with('enabled' => 1) }
it { is_expected.to contain_yumrepo('netways-plugins').with('enabled' => 1) }
it { is_expected.to contain_yumrepo('netways-plugins-release').with('enabled' => 1) }
when 'Suse'
it { is_expected.not_to contain_zypprepo('icinga-stable-release') }
it { is_expected.to contain_zypprepo('icinga-testing-builds').with('enabled' => 1) }
Expand All @@ -78,11 +78,11 @@
when 'Debian'
it { is_expected.not_to contain_apt__source('icinga-stable-release') }
it { is_expected.to contain_apt__source('icinga-snapshot-builds').with('ensure' => 'present') }
it { is_expected.to contain_apt__source('netways-extras').with('ensure' => 'present') }
it { is_expected.to contain_apt__source('netways-extras-release').with('ensure' => 'present') }
when 'RedHat'
it { is_expected.not_to contain_yumrepo('icinga-stable-release') }
it { is_expected.to contain_yumrepo('icinga-snapshot-builds').with('enabled' => 1) }
it { is_expected.to contain_yumrepo('netways-extras').with('enabled' => 1) }
it { is_expected.to contain_yumrepo('netways-extras-release').with('enabled' => 1) }
when 'Suse'
it { is_expected.not_to contain_zypprepo('icinga-stable-release') }
it { is_expected.to contain_zypprepo('icinga-snapshot-builds').with('enabled' => 1) }
Expand Down

0 comments on commit 45510b0

Please sign in to comment.