X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=manifests%2Fsource.pp;h=cb75635797ca882832467d64be7d8228b86765aa;hb=f862889455c4c9994d0afc21a84715f4bc051a9c;hp=cca03e97527ce921e93afc89db49d33c461a3580;hpb=d6069a619ce1b30f19014932f81e83f445c846e6;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/manifests/source.pp b/manifests/source.pp index cca03e9..cb75635 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -88,7 +88,7 @@ define apt::source( } # Newer oses, do not need the package for HTTPS transport. $_transport_https_releases = [ 'wheezy', 'jessie', 'stretch', 'trusty', 'xenial' ] - if $_release in $_transport_https_releases and $location =~ /(?i:^https:\/\/)/ { + if ($facts['lsbdistcodename'] in $_transport_https_releases) and $location =~ /(?i:^https:\/\/)/ { ensure_packages('apt-transport-https') } } @@ -145,8 +145,14 @@ define apt::source( # We do not want to remove keys when the source is absent. if $key and ($ensure == 'present') { if $_key =~ Hash { + if $_key['ensure'] != undef { + $_ensure = $_key['ensure'] + } else { + $_ensure = $ensure + } + apt::key { "Add key: ${$_key['id']} from Apt::Source ${title}": - ensure => present, + ensure => $_ensure, id => $_key['id'], server => $_key['server'], content => $_key['content'],