aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-10-17 02:54:20 +0200
committerintrigeri <intrigeri@boum.org>2010-10-17 02:54:20 +0200
commit2d75cda2dbefb730777ab03c592f8cd58e30d617 (patch)
treef54c4bf9bac7155b32ddeba15f35ff5d09bfe847 /manifests
parent7a0dc9a37a29f4cbdd44c660478932a57e7511db (diff)
downloadpuppet-apt-2d75cda2dbefb730777ab03c592f8cd58e30d617.tar.gz
puppet-apt-2d75cda2dbefb730777ab03c592f8cd58e30d617.tar.bz2
Use append_if_no_such_line instead of line.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/dselect.pp3
-rw-r--r--manifests/init.pp8
2 files changed, 6 insertions, 5 deletions
diff --git a/manifests/dselect.pp b/manifests/dselect.pp
index fb138da..52c66cb 100644
--- a/manifests/dselect.pp
+++ b/manifests/dselect.pp
@@ -1,9 +1,8 @@
class apt::dselect {
# suppress annoying help texts of dselect
- line { dselect_expert:
+ append_if_no_such_line { dselect_expert:
file => "/etc/dpkg/dselect.cfg",
line => "expert",
- ensure => present,
}
package { dselect: ensure => installed }
diff --git a/manifests/init.pp b/manifests/init.pp
index 619dd0d..82eb231 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -105,13 +105,13 @@ class apt {
config_file { '/etc/apt/apt.conf.d/99from_puppet': }
# little default settings which keep the system sane
- line { 'apt-get-show-upgraded':
+ append_if_no_such_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':
+ append_if_no_such_line { 'dselect-clean':
file => "/etc/apt/apt.conf.d/99from_puppet",
line => "DSelect::Clean ${real_apt_clean};",
before => Config_file[apt_config],
@@ -121,7 +121,9 @@ class apt {
file {
"/etc/apt/apt.conf.d/from_puppet":
ensure => 'absent',
- require => [ Line['apt-get-show-upgraded'], Line['dselect-clean'] ],
+ require => [ Append_if_no_such_line['apt-get-show-upgraded'],
+ Append_if_no_such_line['dselect-clean']
+ ],
}
if $apt_unattended_upgrades {