» Home » Docs » Release notes » Release notes for 0.8
Release notes for 0.8
Rex
Filesystem Functions
Added chown, chgrp and chmod functions to work transparently over ssh.
task "change", sub { chown "jan", "/home/jan", recursive => 1;
chgrp "user", "/home/jan", recursive => 1;
chmod 644, "/etc/passwd";
File Manipulation Functions
Added two functions to manipulate files: delete_lines_matching and append_if_no_such_line.
task "manip", sub { delete_lines_matching "/var/log/auth.log", matching => "root"; delete_lines_matching "/var/log/auth.log", matching => qr{Failed}; append_if_no_such_line "/etc/groups", "mygroup:*:100:myuser1,myuser2", "mygroup"; append_if_no_such_line "/etc/groups", "mygroup:*:100:myuser1,myuser2", qr{^mygroup}; };
Services
Added reload function.
task "reload-apache", sub { service apache2 => "reload"; };
Database Functions
Extended the Database module to support inserts, deletes and updates.
task "db", sub { my @data = db select => { fields => "*", from => "table", where => "enabled=1", }; db insert => "table", { field1 => "value1", field2 => "value2", field3 => 5, }; db update => "table", { set => { field1 => "newvalue", field2 => "newvalue2", }, where => "id=5", }; db delete => "table", { where => "id < 5", }; };
Distribution Support
Added Mageia support for services and packages.