Skip to content

Commit

Permalink
Remove deprecated apt options
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke committed Apr 29, 2017
1 parent a6b4868 commit 3568b1f
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,25 @@
'debian': {
include ::apt, ::apt::backports
apt::source { 'icinga-stable-release':
location => 'http://packages.icinga.com/debian',
release => "icinga-${::lsbdistcodename}",
repos => 'main',
key_source => 'http://packages.icinga.com/icinga.key',
key => 'F51A91A5EE001AA5D77D53C4C6E319C334410682',
include_src => false,
location => 'http://packages.icinga.com/debian',
release => "icinga-${::lsbdistcodename}",
repos => 'main',
key => {
id => 'F51A91A5EE001AA5D77D53C4C6E319C334410682',
source => 'http://packages.icinga.com/icinga.key',
};
}
}
'ubuntu': {
include ::apt
apt::source { 'icinga-stable-release':
location => 'http://packages.icinga.com/ubuntu',
release => "icinga-${::lsbdistcodename}",
repos => 'main',
key_source => 'http://packages.icinga.com/icinga.key',
key => 'F51A91A5EE001AA5D77D53C4C6E319C334410682',
include_src => false,
location => 'http://packages.icinga.com/ubuntu',
release => "icinga-${::lsbdistcodename}",
repos => 'main',
key => {
id => 'F51A91A5EE001AA5D77D53C4C6E319C334410682',
source => 'http://packages.icinga.com/icinga.key',
};
}
}
default: {
Expand All @@ -71,32 +73,32 @@
}
'suse': {

file { '/etc/pki/GPG-KEY-icinga':
ensure => present,
source => 'http://packages.icinga.com/icinga.key',
}
file { '/etc/pki/GPG-KEY-icinga':
ensure => present,
source => 'http://packages.icinga.com/icinga.key',
}

exec { 'import icinga gpg key':
path => '/bin:/usr/bin:/sbin:/usr/sbin',
command => 'rpm --import /etc/pki/GPG-KEY-icinga',
unless => "rpm -q gpg-pubkey-`echo $(gpg --throw-keyids < /etc/pki/GPG-KEY-icinga) | cut --characters=11-18 | tr [A-Z] [a-z]`",
require => File['/etc/pki/GPG-KEY-icinga'],
logoutput => 'on_failure',
}
exec { 'import icinga gpg key':
path => '/bin:/usr/bin:/sbin:/usr/sbin',
command => 'rpm --import /etc/pki/GPG-KEY-icinga',
unless => "rpm -q gpg-pubkey-`echo $(gpg --throw-keyids < /etc/pki/GPG-KEY-icinga) | cut --characters=11-18 | tr [A-Z] [a-z]`",
require => File['/etc/pki/GPG-KEY-icinga'],
logoutput => 'on_failure',
}

case $::operatingsystem {
'SLES': {
zypprepo { 'icinga-stable-release':
baseurl => "http://packages.icinga.com/SUSE/${::operatingsystemmajrelease}/release/",
enabled => 1,
gpgcheck => 1,
require => Exec['import icinga gpg key']
}
}
default: {
fail('Your plattform is not supported to manage a repository.')
case $::operatingsystem {
'SLES': {
zypprepo { 'icinga-stable-release':
baseurl => "http://packages.icinga.com/SUSE/${::operatingsystemmajrelease}/release/",
enabled => 1,
gpgcheck => 1,
require => Exec['import icinga gpg key']
}
}
default: {
fail('Your plattform is not supported to manage a repository.')
}
}
}
'windows': {
warning("The Icinga Project doesn't offer chocolaty packages at the moment.")
Expand Down

0 comments on commit 3568b1f

Please sign in to comment.