diff options
author | nadir <nadir-technik@nadir.org> | 2010-10-22 19:17:57 +0200 |
---|---|---|
committer | nadir <nadir-technik@nadir.org> | 2010-10-22 19:17:57 +0200 |
commit | 851d20a7b621345516e8a8cd83d0970a5ea0521c (patch) | |
tree | 42847383584e518b3917d55d31b39ccafbee585c /manifests/preferences.pp | |
parent | eae01000c1db8bcfa7de17b2a9a8370289b801bc (diff) | |
parent | e2ac1b3d8d1713c81c83a695b776dec1c00d2d47 (diff) | |
download | puppet-apt-851d20a7b621345516e8a8cd83d0970a5ea0521c.tar.gz puppet-apt-851d20a7b621345516e8a8cd83d0970a5ea0521c.tar.bz2 |
merged with immerda/master
Diffstat (limited to 'manifests/preferences.pp')
-rw-r--r-- | manifests/preferences.pp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/manifests/preferences.pp b/manifests/preferences.pp new file mode 100644 index 0000000..772b426 --- /dev/null +++ b/manifests/preferences.pp @@ -0,0 +1,31 @@ +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"]; + } + +} |