» Home » Docs » Release notes » Release notes for 0.9
Release notes for 0.9
Rex
Added Ubuntu support.
Register tasks as function if possible
New function get_operating_system to get the operating system.
Transactions
Added Transaction and the possibility to rollback on transaction failures.
use Rex::Transaction; task "do_something", sub { on_rollback { unlink "/tmp/test"; };
touch "/tmp/test"; die; };
Inventory
Now it's possible to make an inventory of your hardware.
use Data::Dumper; use Rex::Commands::Inventory; task "inventory", "server1", "server2", sub { my $inventory = inventor(); print Dumper($inventory); };
New function file
Use this function to upload a file to your servers.
task "upload", "server1", sub { file "$path/vhost.conf", content => template("../../templates/vhost.conf.tpl"), # on change of the file, do something on_change => sub { say "file was modified"; }; };