aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-11-21 16:24:57 +0100
committerintrigeri <intrigeri@boum.org>2010-11-21 16:24:57 +0100
commitee6d13d1e42acca7374aa302a4f9dfa9001d799f (patch)
treef7d45d0a313a9fd5794ed11ee47418f53fb07047 /manifests/init.pp
parent06a2957f9f0c2b4060709150afa194b98c6995ba (diff)
parentac76a5d52df78aec919f08334ca5b140902a9298 (diff)
downloadpuppet-apt-ee6d13d1e42acca7374aa302a4f9dfa9001d799f.tar.gz
puppet-apt-ee6d13d1e42acca7374aa302a4f9dfa9001d799f.tar.bz2
Merge commit 'ac76a5d52df78aec919f08334ca5b140902a9298'
(Starting to merge changes from immerda.) Conflicts: manifests/default_sources_list.pp manifests/init.pp
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp48
1 files changed, 28 insertions, 20 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index cdcd142..f55507f 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -6,7 +6,7 @@
class apt {
import "custom_sources.pp"
-
+
# See README
$real_apt_clean = $apt_clean ? {
'' => 'auto',
@@ -68,10 +68,11 @@ class apt {
require => undef,
}
+ include lsb
+
# init $release, $next_release, $codename, $next_codename
case $lsbdistcodename {
'': {
- include lsb
$codename = $lsbdistcodename
$release = $lsbdistrelease
}
@@ -85,7 +86,14 @@ class apt {
case $custom_sources_list {
'': {
- include apt::default_sources_list
+ config_file {
+ # include main, security and backports
+ # additional sources should be included via the custom_sources_template
+ # define
+ "/etc/apt/sources.list":
+ content => template( "apt/$operatingsystem/sources.list.erb"),
+ require => Package['lsb'];
+ }
}
default: {
config_file { "/etc/apt/sources.list":
@@ -94,6 +102,18 @@ class apt {
}
}
+ apt_conf_snippet{ "02show_upgraded":
+ source => ["puppet:///modules/site-apt/${fqdn}/02show_upgraded",
+ "puppet:///modules/site-apt/02show_upgraded",
+ "puppet:///modules/apt/02show_upgraded"]
+ }
+
+ apt_conf_snippet{ "03clean":
+ source => ["puppet:///modules/site-apt/${fqdn}/03clean",
+ "puppet:///modules/site-apt/03clean",
+ "puppet:///modules/apt/03clean"]
+ }
+
case $custom_preferences {
false: {
include apt::preferences::absent
@@ -103,26 +123,14 @@ class apt {
}
}
- config_file { '/etc/apt/apt.conf.d/99from_puppet': }
- # little default settings which keep the system sane
- append_if_no_such_line { 'apt-get-show-upgraded':
- file => "/etc/apt/apt.conf.d/99from_puppet",
- line => "APT::Get::Show-Upgraded true;",
- before => Concatenated_file['/etc/apt/preferences'],
- require => Config_file['/etc/apt/apt.conf.d/99from_puppet'],
- }
- append_if_no_such_line { 'dselect-clean':
- file => "/etc/apt/apt.conf.d/99from_puppet",
- line => "DSelect::Clean ${real_apt_clean};",
- before => Concatenated_file['/etc/apt/preferences'],
- require => Config_file['/etc/apt/apt.conf.d/99from_puppet'],
- }
# backward compatibility: upgrade from previous versions of this module.
file {
- "/etc/apt/apt.conf.d/from_puppet":
+ ["/etc/apt/apt.conf.d/from_puppet",
+ "/etc/apt/apt.conf.d/99from_puppet"
+ ]:
ensure => 'absent',
- require => [ Append_if_no_such_line['apt-get-show-upgraded'],
- Append_if_no_such_line['dselect-clean']
+ require => [ Apt_conf_snippet['02show_upgraded'],
+ Apt_conf_snippet['03clean'],
],
}