Closed jeffreymlewis closed 10 years ago
Order matters in the Augeas tree. file
nodes must be the first nodes in a rule
tree, so you need to insert your new file after the last one already present:
insert file after /files/etc/logrotate.d/rsyslog/*[rotate='4']/file[last()]
set /files/etc/logrotate.d/rsyslog/*[rotate='4']/file[last()] /var/log/jlewis2.log
Order matters in the Augeas tree.
file
nodes must be the first nodes in arule
tree, so you need to insert your new file after the last one already present:insert file after /files/etc/logrotate.d/rsyslog/*[rotate='4']/file[last()] set /files/etc/logrotate.d/rsyslog/*[rotate='4']/file[last()] /var/log/jlewis2.log
Each time you run these commands (ex: with Puppet) a new line will be added regardless it already exists.
Doing set /files/etc/logrotate.d/rsyslog/*[rotate = '4']/file[. = '/var/log/jlewis2.log'] /var/log/jlewis2.log
void dupes...
When trying to add a "file" to /etc/logrotate.d/rsyslog I get a, "Failed to match" error when saving. This happens with augeas version 0.10.0 (shipping with Ubuntu precise) and version 1.2.0. Here's an example with augeas version 1.2.0 on Ubuntu 12.04 LTS.