This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
augeas [2016/07/07 16:28] k2patel created |
augeas [2017/07/02 02:18] k2patel old revision restored (2017/02/10 20:43) |
||
---|---|---|---|
Line 53: | Line 53: | ||
You can run 'augtool' and serch for the lenses provided in `ls /augeas/load/` | You can run 'augtool' and serch for the lenses provided in `ls /augeas/load/` | ||
+ | |||
+ | Usecase 3: | ||
+ | <code bash> | ||
+ | /opt/puppetlabs/puppet/bin/augtool -At "Logrotate.lns incl /etc/logrotate.d/httpd" | ||
+ | |||
+ | get /files/etc/logrotate.d/httpd/rule/delaycompress | ||
+ | rm /files/etc/logrotate.d/httpd/rule/delaycompress | ||
+ | set /files/etc/logrotate.d/httpd/rule/schedule monthly | ||
+ | </code> | ||
+ | |||
+ | === Logrotate === | ||
+ | <code ruby> | ||
+ | augeas { "apache_logrotate": | ||
+ | lens => "Logrotate.lns", | ||
+ | incl => "/etc/logrotate.d/httpd", | ||
+ | changes => [ | ||
+ | "rm /files/etc/logrotate.d/httpd/rule/delaycompress", | ||
+ | "set /files/etc/logrotate.d/httpd/rule/rotate 99999", | ||
+ | "set /files/etc/logrotate.d/httpd/rule/schedule monthly", | ||
+ | ], | ||
+ | } | ||
+ | </code> |