- exec { "${name} apt update":
- command => "${apt::params::provider} update",
- subscribe => File["${name}.list"],
- refreshonly => true,
+ if ($pin != false) {
+ # Get the host portion out of the url so we can pin to origin
+ $url_split = split($location, '/')
+ $host = $url_split[2]
+
+ apt::pin { $name:
+ ensure => $ensure,
+ priority => $pin,
+ before => File["${name}.list"],
+ origin => $host,
+ }