summaryrefslogtreecommitdiff
path: root/puppet/modules/site_config/manifests
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-05-26 16:23:40 +0200
committervarac <varacanero@zeromail.org>2015-05-26 16:23:40 +0200
commit4105838757e1843ece8935ddae82a3cbb9febc7a (patch)
treedac4f071c7e08c6170d9f90e9fbfe3c2fdbfd1f3 /puppet/modules/site_config/manifests
parent344d8e5fa78cbe5ab2d2a5f4a867c03047057efd (diff)
parent26f7665f556570e4bbd446d7b2046854642aff58 (diff)
Merge branch '6964_use_exec_to_remove_matching_fileline' into 0.7.0
Diffstat (limited to 'puppet/modules/site_config/manifests')
-rw-r--r--puppet/modules/site_config/manifests/default.pp5
-rw-r--r--puppet/modules/site_config/manifests/remove_files.pp11
2 files changed, 7 insertions, 9 deletions
diff --git a/puppet/modules/site_config/manifests/default.pp b/puppet/modules/site_config/manifests/default.pp
index 57e45506..e69e4b7b 100644
--- a/puppet/modules/site_config/manifests/default.pp
+++ b/puppet/modules/site_config/manifests/default.pp
@@ -1,4 +1,3 @@
-# This class is the basic configuration for all nodes
class site_config::default {
tag 'leap_base'
@@ -14,10 +13,6 @@ 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 05a758bb..3f46659c 100644
--- a/puppet/modules/site_config/manifests/remove_files.pp
+++ b/puppet/modules/site_config/manifests/remove_files.pp
@@ -34,10 +34,13 @@ class site_config::remove_files {
}
# 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.*')]" ],
+ # we need to use a dumb exec here because file_line doesn't
+ # allow removing lines that match a regex in the current version
+ # of stdlib, see https://tickets.puppetlabs.com/browse/MODULES-1903
+ exec { 'rm_old_leap_mx_log_destination':
+ command => "/bin/sed -i '/leap_mx.log/d' /etc/check_mk/logwatch.state",
+ onlyif => "/bin/grep -qe 'leap_mx.log' /etc/check_mk/logwatch.state"
}
+
}