]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
Use append_if_no_such_line instead of line.
authorintrigeri <intrigeri@boum.org>
Sun, 17 Oct 2010 00:54:20 +0000 (02:54 +0200)
committerintrigeri <intrigeri@boum.org>
Sun, 17 Oct 2010 00:54:20 +0000 (02:54 +0200)
manifests/dselect.pp
manifests/init.pp

index fb138da2a6082f0fca06cbe41db7f33448aacda7..52c66cb1d621dc1dfe7f707bfe21caae4da4efb2 100644 (file)
@@ -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 }
index 619dd0df8ecad1a0668352df2cec9f719522644e..82eb231d629f9a13165c0b1a0870b3452f9a34f6 100644 (file)
@@ -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 {