Add a 'direct' option to proxy settings
[puppet-modules/puppetlabs-apt.git] / manifests / source.pp
index a95bc592f98d03749076786faae1f0932ff5da35..3e6d0cb814870d0b30a4b3bd0fab11282d4e3935 100644 (file)
@@ -29,8 +29,15 @@ define apt::source(
     $_release = $release
   }
 
-  if $ensure == 'present' and ! $location {
-    fail('cannot create a source entry without specifying a location')
+  if $ensure == 'present' {
+    if ! $location {
+      fail('cannot create a source entry without specifying a location')
+    } elsif $_release == 'jessie' {
+      $method = split($location, '[:\/]+')[0]
+      if $method == 'https' {
+        ensure_packages('apt-transport-https')
+      }
+    }
   }
 
   $includes = merge($::apt::include_defaults, $include)