User Tools

Site Tools


augeas

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
augeas [2016/07/07 16:28]
k2patel created
augeas [2020/08/10 02:35] (current)
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"​
 +print
 +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>​
augeas.1467908923.txt.gz ยท Last modified: 2020/08/10 02:28 (external edit)