Skip to content

Augeas Module for (R)?ex - Merged into Rex Core (v1.0.0)

Notifications You must be signed in to change notification settings

RexOps/rex-augeas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rex-augeas is a (R)?ex module to manage configuration files with libaugeas.

Dependencies

Config::Augeas
http://augeas.net/

Usage

In your Rexfile use the following commands.

use Rex::Augeas;

task "example", sub {
   
  augeas modify => 
     "/files/etc/hosts/7/ipaddr"    => "10.211.55.6",
     "/files/etc/hosts/7/canonical" => "blah01";
    
  augeas remove => "/files/etc/hosts/2";
  
  augeas dump => "/files/etc/hosts";

  my $val = augeas exists => "/files/etc/hosts/*/ipaddr", "127.0.0.1";
  
  augeas insert => "/files/etc/hosts",
           label => "01",
           after => "/7",
           ipaddr => "192.168.2.23",
           canonical => "mango.linoratix.com",
           alias => "mango";
    
};

About

Augeas Module for (R)?ex - Merged into Rex Core (v1.0.0)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages