]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Merge pull request #714 from actatux/apt-transport-https_debian8
authorwillmeek <william.meek@puppet.com>
Thu, 2 Nov 2017 16:23:55 +0000 (16:23 +0000)
committerGitHub <noreply@github.com>
Thu, 2 Nov 2017 16:23:55 +0000 (16:23 +0000)
Install apt-transport-https in Debian 8 if needed

manifests/init.pp
manifests/key.pp

index 319e0649cd74fc0695f13afc8119804f289db7fb..581ce2d32db403b91eeda05a41a4db732a5e386d 100644 (file)
@@ -183,7 +183,7 @@ class apt (
   # required for adding GPG keys on Debian 9 (and derivatives)
   case $facts['os']['name'] {
     'Debian': {
-      if versioncmp($facts['os']['release']['full'], '9.0') >= 0 {
+      if versioncmp($facts['os']['release']['major'], '9') >= 0 {
         ensure_packages(['dirmngr'])
       }
     }
index 0dad80b04c543797f6470f40aae251c0e6ea6568..1933b3f9110b996e666208132e06188d1dc8c5a6 100644 (file)
@@ -41,17 +41,15 @@ define apt::key (
 
         case $facts['os']['name'] {
           'Debian': {
-            if versioncmp($facts['os']['release']['full'], '9.0') >= 0 {
-              Apt::Key<| title == $title |> {
-                require => Package['dirmngr']
-              }
+            if versioncmp($facts['os']['release']['major'], '9') >= 0 {
+              ensure_packages(['dirmngr'])
+              Apt::Key<| title == $title |>
             }
           }
           'Ubuntu': {
             if versioncmp($facts['os']['release']['full'], '17.04') >= 0 {
-              Apt::Key<| title == $title |> {
-                require => Package['dirmngr']
-              }
+              ensure_packages(['dirmngr'])
+              Apt::Key<| title == $title |>
             }
           }
           default: { }