[augeas-devel] logrotate lense - multiple files

haerry+augeas at puzzle.ch haerry+augeas at puzzle.ch
Mon Jun 1 19:11:04 UTC 2009


-----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"'
}

(side note: is the onlyif now implicit by the changes?)

this fails as augeas fails to save the change. The same if I try it in
augtool:

augtool> set /files/etc/logrotate.d/httpd/rule/file "/var/log/httpd/*log
/var/www/vhosts/*/logs/*log"
augtool> save
Saving failed

however if I have only one filepath I can change to whatever I'd like
and it works as assumed.

I looked a bit at the lense and thought that the problem might be (if I
interpreted the lense correctly) that only one word is allowed for file.
Am I right?

any other ideas what might cause the problem or how to solve it?

This have been tested on latest CentOS with latest EPEL stuff:

rpm -qa | grep augeas
ruby-augeas-0.2.0-1.el5
augeas-0.5.0-2.el5
augeas-libs-0.5.0-2.el5

if you need any further infos, pleas let me know.

thanks and cheers

Marcel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkokJ8cACgkQxqnHThA4pEkwxACgwtwoXmz9ncLXNBnHJAjZEnNO
FfwAnjCYglLIc6+hrvlwBMRFvmS6PS+d
=xkjO
-----END PGP SIGNATURE-----




More information about the augeas-devel mailing list