summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-10-17 02:21:08 +0200
committerintrigeri <intrigeri@boum.org>2010-10-17 02:30:28 +0200
commit7a0dc9a37a29f4cbdd44c660478932a57e7511db (patch)
treeccbe00c4a680261fb8fcfb1cc3fdc02f51755f18 /manifests/init.pp
parent8ce3c34be56770e7030108bbd9d4d0cdbd7e5e2f (diff)
Migrate config file to line-editing.
This allows other modules to add lines there too.
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp24
1 files changed, 14 insertions, 10 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index a95ff17..619dd0d 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -103,17 +103,25 @@ class apt {
}
}
- config_file {
- # little default settings which keep the system sane
- "/etc/apt/apt.conf.d/99from_puppet":
- content => "APT::Get::Show-Upgraded true;\nDSelect::Clean $real_apt_clean;\n",
- before => Config_file[apt_config];
+ config_file { '/etc/apt/apt.conf.d/99from_puppet': }
+ # little default settings which keep the system sane
+ line { 'apt-get-show-upgraded':
+ file => "/etc/apt/apt.conf.d/99from_puppet",
+ line => "APT::Get::Show-Upgraded true;",
+ before => Config_file[apt_config],
+ require => Config_file['/etc/apt/apt.conf.d/99from_puppet'],
+ }
+ line { 'dselect-clean':
+ file => "/etc/apt/apt.conf.d/99from_puppet",
+ line => "DSelect::Clean ${real_apt_clean};",
+ before => Config_file[apt_config],
+ 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":
ensure => 'absent',
- require => Config_File['/etc/apt/apt.conf.d/99from_puppet'],
+ require => [ Line['apt-get-show-upgraded'], Line['dselect-clean'] ],
}
if $apt_unattended_upgrades {
@@ -125,10 +133,6 @@ class apt {
modules_dir { apt: }
# watch apt.conf.d
file { "/etc/apt/apt.conf.d": ensure => directory, checksum => mtime; }
- file { '/etc/apt/apt.conf.d/99-puppet':
- ensure => 'file',
- owner => 'root', group => '0', mode => '0644',
- }
exec {
# "&& sleep 1" is workaround for older(?) clients