diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/dselect.pp | 3 | ||||
-rw-r--r-- | manifests/init.pp | 8 |
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 { |