diff options
4 files changed, 30 insertions, 0 deletions
diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp index c32c29c4..75f545d4 100644 --- a/puppet/modules/site_apt/manifests/init.pp +++ b/puppet/modules/site_apt/manifests/init.pp @@ -1,3 +1,4 @@ +# setup basic debian package manager configuration class site_apt { $sources = hiera('sources') @@ -31,6 +32,8 @@ class site_apt { priority => 999 } + include site_apt::preferences::augeas + # All packages should be installed _after_ refresh_apt is called, # which does an apt-get update. # There is one exception: diff --git a/puppet/modules/site_apt/manifests/preferences/augeas.pp b/puppet/modules/site_apt/manifests/preferences/augeas.pp new file mode 100644 index 00000000..257d64c4 --- /dev/null +++ b/puppet/modules/site_apt/manifests/preferences/augeas.pp @@ -0,0 +1,15 @@ +# install augeas packages from backports +class site_apt::preferences::augeas { + + # i could not get + # site_config::remove_files::augeas::['rm_old_leap_mx_log_destination'] + # to remove a line matching a regex with the wheezy version of augeas-lenses + # (0.10.0-1). Therefore we install it from backports + + apt::preferences_snippet { 'augeas': + package => 'augeas-lenses augeas-tools libaugeas0', + release => "${::lsbdistcodename}-backports", + priority => 999; + } + +} diff --git a/puppet/modules/site_config/manifests/default.pp b/puppet/modules/site_config/manifests/default.pp index e69e4b7b..57e45506 100644 --- a/puppet/modules/site_config/manifests/default.pp +++ b/puppet/modules/site_config/manifests/default.pp @@ -1,3 +1,4 @@ +# This class is the basic configuration for all nodes class site_config::default { tag 'leap_base' @@ -13,6 +14,10 @@ class site_config::default { include apt::update Package { require => Exec['apt_updated'] } + class {'augeas': + version => 'latest' + } + include site_config::slow # default class, used by all hosts diff --git a/puppet/modules/site_config/manifests/remove_files.pp b/puppet/modules/site_config/manifests/remove_files.pp index 44e3e47b..05a758bb 100644 --- a/puppet/modules/site_config/manifests/remove_files.pp +++ b/puppet/modules/site_config/manifests/remove_files.pp @@ -33,4 +33,11 @@ class site_config::remove_files { rmdirs => true; } + # leax-mx logged to /var/log/leap_mx.log in the past + augeas { 'rm_old_leap_mx_log_destination': + incl => '/etc/check_mk/logwatch.state', + lens => 'Simplelines.lns', + changes => [ "rm /files/etc/check_mk/logwatch.state/*[.=~regexp('.*leap_mx.log.*')]" ], + } + } |