Are you certain that the pattern matches? I see an \{ and no matching \} in
your promise. Likewise, I see spaces in your pattern - are the number and type
of whitespace an exact match? You might want to consider using \s+ or \s*
instead of just a single space.
-Dan
On Jan 7, 2011, at 10:48 AM, [email protected] wrote:
> Forum: Cfengine Help
> Subject: Re: replace_pattern with quotes
> Author: Ferjama
> Link to topic: https://cfengine.com/forum/read.php?3,20037,20042#msg-20042
>
> Hi bbomgardner,
>
> I used the '\' bevor but it dosn't work. This is my new pattern:
>
> 'destination messages \{ file\(\"/var/log/messages\"\);'
> replace_with => value('destination messages {
> file(\"/var/log/messages\" group(log));');
>
> But I get allways the same out put with "cf-agent -v"
>
> Promise handle:
> cf3 Promise made by: destination messages { file("/var/log/messages"); };
> cf3 .........................................................
> cf3
> cf3 -> Looking at pattern destination messages { file("/var/log/messages");
> };
> cf3 -> No pattern "destination messages { file("/var/log/messages"); };" in
> /etc/syslog-ng/syslog-ng.conf
>
> In the out are none of my "\". Is this correct?
> I checked my pattern with "less" and there it worked.
>
> _______________________________________________
> Help-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine