Forum: Cfengine Help
Subject: replace_pattern with quotes
Author: Ferjama
Link to topic: https://cfengine.com/forum/read.php?3,20037,20037#msg-20037

Hallo Forum-Team,

I have a little Problem with replace_pattern. I want to change a line in 
syslog-ng.conf with has quotes. 
The default line is

destination messages { file("/var/log/messages"); };

and should look like this

destination messages { file("/var/log/messages" group(log)); };

But if I'm searching for the lines he dosn't find it.

Here are the versions I tried:

    replace_patterns:
        'destination messages { file("/var/log/messages"); };'
            replace_with => value('destination messages { 
file("/var/log/messages" group(log)); };');
#       'destination messages { file(\"/var/log/messages\"); };'
#           replace_with => value('destination messages { 
file(\"/var/log/messages\" group(log)); };');
#       "destination messages { file[.*]"
#           replace_with => value('destination messages { 
file("/var/log/messages" group(log)); };');


I hope someone can help me.

Best regards
 Stephan

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to