puppet 3.0 update
Orion Poplawski <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
This small patch updates the puppet script to handle the content lines from puppet 3.0. Instead of everything on one line: Aug 3 15:28:24 vmsl63 puppet-agent[1661]: (/File[/etc/sysconfig/nfs]/content) #012--- /etc/sysconfig/nfs#0112012-06-20 21:12:48.000000000 -0600#012+++ /tmp/puppet-file20120803-1661-rqbjci-0#0112012-08-03 15:28:23.991729442 -0600 It splits it up: Jan 23 10:19:11 barry puppet-agent[12784]: (/File[/etc/ssh/ssh_config]/content) Jan 23 10:19:11 barry puppet-agent[12784]: (/File[/etc/ssh/ssh_config]/content) --- /etc/ssh/ssh_config#0112013-01-22 14:55:24.842401122 -0700 Jan 23 10:19:11 barry puppet-agent[12784]: (/File[/etc/ssh/ssh_config]/content) +++ /tmp/puppet-file20130123-12784-1w1sg0n#0112013-01-23 10:19:11.040870837 -0700 -- Orion Poplawski Technical Manager 303-415-9701 x222 NWRA, Boulder Office FAX: 303-415-9702 3380 Mitchell Lane [email protected] Boulder, CO 80301 http://www.nwra.com ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ Logwatch-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/logwatch-devel
logwatch-puppet.patch
(text/x-patch, 992 B)
Index: scripts/services/puppet
===================================================================
--- scripts/services/puppet (revision 130)
+++ scripts/services/puppet (working copy)
@@ -122,9 +122,9 @@
} elsif (($type, $name, $attr, $from) = $ThisLine =~ /([^\/]+)\[([^\]]+)\]\/([^\/]+)\) undefined '.+' from '(.*)'/) {
$Changed{$type}->{$name}->{$attr}->{'from'} = $from;
$Changed{$type}->{$name}->{$attr}->{'to'} = 'undefined';
- } elsif (($type, $name, $content) = $ThisLine =~ /([^\/]+)\[([^\]]+)\]\/content\) (.*)/) {
+ } elsif (($type, $name, $content) = $ThisLine =~ /([^\/]+)\[([^\]]+)\]\/content\)(.*)/) {
$content =~ s/#011/\t/g;
- $content =~ s/#012/\n /g;
+ $content =~ s/#012/\n /g or $content .= "\n ";
$Changed{$type}->{$name}->{'contents'} .= $content;
} elsif (($source, $target) = $ThisLine =~ /^\(\/(.*)\) Scheduling refresh of (.*)/) {
$ScheduledRefresh{"$source -> $target"}++;