aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorroot <nadir-technik@nadir.org>2009-12-11 17:51:49 +0100
committerroot <nadir-technik@nadir.org>2009-12-11 17:51:49 +0100
commit854f3c10b09b46ef9d9fce5293dd0665b619065e (patch)
tree26e18d1021eb8be0674f751d99ce7fccb2f8b572 /manifests/init.pp
parent2b2950b20e2b171c2798e1265cde62a44382616f (diff)
downloadpuppet-apt-854f3c10b09b46ef9d9fce5293dd0665b619065e.tar.gz
puppet-apt-854f3c10b09b46ef9d9fce5293dd0665b619065e.tar.bz2
Added apt::unattended_upgrades class, and extra template for "deb-src"
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp33
1 files changed, 32 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 1af6e1f..07b6c2b 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -3,6 +3,7 @@
# Copyright (C) 2007 David Schmitt <david@schmitt.edv-bus.at>
# See LICENSE for the full license granted to you.
+
class apt {
# See README
@@ -15,6 +16,11 @@ class apt {
'' => 'false',
default => $backports_enabled,
}
+
+ $apt_deb_src_enabled = $apt_deb_src_enabled ? {
+ 'true' => 'true',
+ default => $apt_deb_src_enabled,
+ }
package { apt: ensure => installed }
@@ -150,7 +156,17 @@ class apt {
default: { }
}
-
+ case $apt_deb_src_enabled {
+ 'true': {
+ config_file {
+ # deb-src
+ "/etc/apt/sources.list.d/debian-sources.list":
+ content => template("apt/sources.list.deb-src.erb"),
+ require => Exec[assert_lsbdistcodename];
+ }
+ }
+ default: {}
+ }
case $custom_key_dir {
'': {
@@ -226,3 +242,18 @@ class dselect {
package { dselect: ensure => installed }
}
+
+
+class apt::unattended_upgrades {
+ case $operatingsystem {
+ debian,ubuntu: {
+ package { unattended-upgrades : ensure => latest; }
+ file { "/etc/apt/apt.conf.d/50unattended-upgrades":
+ source => "puppet://$server/modules/apt/50unattended-upgrades" }
+ }
+
+ default: { notice "unknown operatingsystem: $operatingsystem for class apt::unattended_upgrades" }
+ }
+
+}
+