diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/package.pp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/manifests/package.pp b/manifests/package.pp index b2ae79d..159d693 100644 --- a/manifests/package.pp +++ b/manifests/package.pp @@ -2,6 +2,8 @@ define apt::package ( $ensure = 'present', $seedfile_content = '', + $pin = '', + $pin_priority = 1000 ) { $seedfile = "/var/cache/local/preseeding/${name}.seeds" @@ -17,9 +19,17 @@ define apt::package ( group => 0, } + if $pin { + apt::preferences_snippet { $name: + ensure => $ensure, + priority => $pin_priority, + pin => $pin, + } + } + package { $name: ensure => $ensure, responsefile => $seedfile, - require => File[$seedfile], + require => [File[$seedfile], Apt::Preferences_snippet[$name]], } } |