Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

Need help with file_line match regex statement

$
0
0
I have the following line in a file... # /var/log/tomcat6/catalina.out ... which I wish to change to ... /var/log/tomcat6/catalina.out ... and my match statement isn't working. Here is my file_line statement... file_line { 'Uncomment Tomcat6 log': path => '/etc/logrotate.conf',/var/log/tomcat6/catalina.out match => '^# /var/log/tomcat6/catalina.out.*$', line => '/var/log/tomcat6/catalina.out'; } I've used this same syntax for other lines in other files, but not to remove characters, only append characters. I'm trying to remove the comment delimiter from the beginning of the line. The error I get is ... "When providing a 'match' parameter, the value must be a reqex that matches against the value of your 'line' parameter." The regex expression used with 'match" works if I use it with grep from the command line; it finds the line. So I'm thinking there is a problem with my "line" directive.

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>