$sources = {},
$keys = {},
$ppas = {},
+ $pins = {},
$settings = {},
) inherits ::apt::params {
$_purge = merge($::apt::purge_defaults, $purge)
validate_hash($proxy)
+ if $proxy['ensure'] {
+ validate_re($proxy['ensure'], ['file', 'present', 'absent'])
+ }
if $proxy['host'] {
validate_string($proxy['host'])
}
validate_hash($keys)
validate_hash($settings)
validate_hash($ppas)
+ validate_hash($pins)
- if $proxy['host'] {
+ if $_proxy['ensure'] == 'absent' or $_proxy['host'] {
apt::setting { 'conf-proxy':
+ ensure => $_proxy['ensure'],
priority => '01',
content => template('apt/_conf_header.erb', 'apt/proxy.erb'),
}
if $settings {
create_resources('apt::setting', $settings)
}
+
+ # manage pins if present
+ if $pins {
+ create_resources('apt::pin', $pins)
+ }
}