Allow priorities to be zero-padded
[puppet-modules/puppetlabs-apt.git] / manifests / init.pp
index faaecc741332e6d970ec66c915d12b47c5a0f37c..b82bd27e0e6ee28579a5b47c694e332ace1bbfd3 100644 (file)
@@ -11,10 +11,6 @@ class apt(
   $sources              = undef,
 ) inherits ::apt::params {
 
-  if $::osfamily != 'Debian' {
-    fail('This module only works on Debian or derivatives like Ubuntu')
-  }
-
   include apt::update
 
   $frequency_options = ['always','daily','weekly','reluctantly']
@@ -42,15 +38,9 @@ class apt(
     owner   => 'root',
   }
 
-  $root           = $apt::params::root
-  $apt_conf_d     = $apt::params::apt_conf_d
-  $sources_list_d = $apt::params::sources_list_d
-  $preferences_d  = $apt::params::preferences_d
-  $provider       = $apt::params::provider
-
   file { 'sources.list':
     ensure  => present,
-    path    => "${root}/sources.list",
+    path    => $::apt::sources_list,
     owner   => root,
     group   => root,
     mode    => '0644',
@@ -60,7 +50,7 @@ class apt(
 
   file { 'sources.list.d':
     ensure  => directory,
-    path    => $sources_list_d,
+    path    => $::apt::sources_list_d,
     owner   => root,
     group   => root,
     purge   => $purge_sources_list_d,
@@ -71,13 +61,13 @@ class apt(
   if $purge_preferences {
     file { 'apt-preferences':
       ensure => absent,
-      path   => "${root}/preferences",
+      path   => $::apt::preferences,
     }
   }
 
   file { 'preferences.d':
     ensure  => directory,
-    path    => $preferences_d,
+    path    => $::apt::preferences_d,
     owner   => root,
     group   => root,
     purge   => $purge_preferences_d,