module-apt/manifests/preferences.pp
mh e2ac1b3d8d Merge remote branch 'lelutin/master'
Integrate no custom preference into our new
way to manage the preferences.

Conflicts:
	README
	manifests/default_preferences.pp
	manifests/init.pp
2010-10-21 01:59:41 +02:00

31 lines
790 B
Puppet

class apt::preferences {
include common::moduledir
$apt_preferences_dir = "${common::moduledir::module_dir_path}/apt/preferences"
module_dir{'apt/preferences': }
file{"${apt_preferences_dir}_header":
content => $custom_preferences ? {
'' => 'Package: *
Pin: release a=unstable
Pin-Priority: 1
Package: *
Pin: release a=testing
Pin-Priority: 2
',
default => $custom_preferences
},
}
concatenated_file{'/etc/apt/preferences':
dir => $apt_preferences_dir,
header => "${apt_preferences_dir}_header",
# use Concatenated_file[apt_config] to reference a completed configuration
# See "The Puppet Semaphor" 2007-06-25 on the puppet-users ML
alias => apt_config,
# only update together
require => File["/etc/apt/sources.list"];
}
}