Convert apt::key to use anchors
[puppet-modules/puppetlabs-apt.git] / manifests / pin.pp
index e8b251f7c882c60a413ecafa60509fb1d1230b99..40695af5fa8f84eb4cba4a2ca26ebd84b57818d4 100644 (file)
@@ -2,19 +2,18 @@
 # pin a release in apt, useful for unstable repositories
 
 define apt::pin(
-       $packages = '*',
-       $priority = 0
+  $packages = '*',
+  $priority = 0
 ) {
 
-       include apt
-
-       file { "${name}.pref":
-               name => "${apt::root}/preferences.d/${name}",
-               ensure => file,
-               owner => root,
-               group => root,
-               mode => 644,
-               content => "# ${name}\nPackage: ${packages}\nPin: release a=${name}\nPin-Priority: ${priority}",
-       }
+  include apt::params
 
+  file { "${name}.pref":
+    path => "${apt::params::root}/preferences.d/${name}",
+    ensure => file,
+    owner => root,
+    group => root,
+    mode => 644,
+    content => "# ${name}\nPackage: ${packages}\nPin: release a=${name}\nPin-Priority: ${priority}",
+  }
 }