Re: [Puppet Users] logrotate and augeas

2012-05-08 Thread Felice Pizzurro
Thanks a lot! it works fine! As in rsyslog logrotate conf file there are many rules, I used this syntax to retrieve the correct rule instead to define rule index manually: augtool> print /files/etc/logrotate.d/rsyslog/rule[file =~ regexp("/var/log/mail.*")]/file[. =~ regexp("/var/log/mail.*")

Re: [Puppet Users] logrotate and augeas

2012-05-08 Thread Dominic Cleal
On 08/05/12 09:26, Luke Bigum wrote: > Theoretically you should be able to do this: > > augtool> print /files/etc/logrotate.d/syslog/rule/file[. =~ > regexp("/var/log/mail")] > > ... but I can't get the Regular Expression function to work in augtool :-( Very nearly. Try this: augtool> print /

Re: [Puppet Users] logrotate and augeas

2012-05-08 Thread Luke Bigum
Theoretically you should be able to do this: augtool> print /files/etc/logrotate.d/syslog/rule/file[. =~ regexp("/var/log/mail")] ... but I can't get the Regular Expression function to work in augtool :-( You could match each one, considering you know the names of each Syslog Level: augtoo

[Puppet Users] logrotate and augeas

2012-05-07 Thread Felice Pizzurro
Hi all, I have to modify logrotate conf file for rsyslog with augeas. I have this configuration: /var/log/syslog { rotate 7 daily missingok notifempty delaycompress compress postrotate reload rsyslog >/dev/null 2>&1 || true endscript } /var/log/mail.info