[augeas-devel] logrotate lense - multiple files

Raphaël Pinson raphink at gmail.com
Mon Jun 1 19:44:55 UTC 2009


On Mon, Jun 1, 2009 at 9:11 PM,  <haerry+augeas at puzzle.ch> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi
>
> I'm quite new in using augeas, however I followed it already for a while.
>
> Currently I try to change logrotate config file with augeas in puppet.
> However I'm not able to do it nor I know exactly what might cause the
> problem. I assume I might encountered a limitation of the logrotate lense:
>
> I tried the following:
>
> augeas { "logrotate":
>    context => "/files/etc/logrotate.d/httpd/rule",
>    changes => 'set file "/var/log/httpd/*log /var/www/vhosts/*/logs/*log"',
>    onlyif => 'get file != "/var/log/httpd/*log
> /var/www/vhosts/*/logs/*log"'
> }


It fails because file cannot have spaces iirc. If you want several
files, you need to define several file nodes. I have no idea how to do
that easily with the puppet provider.

You can try it with augtool to get an idea of the tree in the logrotate lens.


Raphaël




More information about the augeas-devel mailing list