User Tools

Site Tools


augeas

Differences

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

Link to this comparison view

augeas [2015/10/20 12:37]
ian [Load a File with A Specific Lens]
augeas [2020/02/13 22:55]
Line 1: Line 1:
-====== Augeas / augtool ====== 
- 
-===== Uncomment a Line ===== 
- 
-<code> 
-augtool --backup <<END 
-rename /files/etc/ssh/sshd_config/#comment[.="PermitRootLogin yes"] PermitRootLogin 
-set /files/etc/ssh/sshd_config/PermitRootLogin without-password 
-save 
-END 
-</code> 
- 
-===== Load a File with A Specific Lens ===== 
- 
-<code> 
-:~# augtool --backup 
-augtool> set /augeas/load/Shellvars/incl[last()+1] "/etc/exim4/update-exim4.conf.conf" 
-augtool> load 
-augtool> set /files/etc/exim4/update-exim4.conf.conf/dc_smarthost 'mail.domain.com' 
-augtool> save 
-augtool> quit 
-</code> 
- 
-==== Puppet ==== 
- 
-<code> 
-augeas { "exim4-config": 
-  lens    => 'Shellvars.lns', 
-  incl    => '/etc/exim4/update-exim4.conf.conf', 
-  context => '/files/etc/exim4/update-exim4.conf.conf', 
-  changes => [ 
-    "set dc_smarthost 'mail.domain.com'" 
-  ], 
-} 
-</code> 
  
augeas.txt ยท Last modified: 2020/02/13 22:55 (external edit)

free spam filter