(R)?ex the friendly automation framework



Rex-1.14.3 is now available on CPAN. It contains bug fixes for local package installation, command existence checks, and Git tests.


The Rex-1.14.2 release is now available on CPAN. It contains bug fixes for running local commands on Windows, cloning git repositories, and test suite fixes for the upcoming perl-5.38.0 release.

Call for papers TPRC 2023

Dean Hamstead from the The Perl and Raku Foundation Marketing Committee has sent an invitation to present about Rex at TPRC 2023. I’m posting it here to increase visibility.


The Rex-1.14.1 release is now available on CPAN. It contains bug fixes and documentation updates.


The Rex-1.14.0 release is now available on CPAN. It contains improved Rexfile loading, documentation updates, and bumps the minimum required Perl version to 5.12.5.


Learning automation using Rex

Ferenc Erki (FErki) will be the guest of Gábor Szabó on the next Code Maven live stream to learn about automation using Rex. Register for the free event via Code Maven or Meetup, and join the discussion!

Unexpected use cases with Rex

Unexpected use cases with Rex at the 22nd German Perl/Raku Workshop 2020 in Erlangen by Ferenc Erki (FErki).

Rex & Friends

Rex & Friends talk at the Barcelona Perl & Friends 2019 by Ferenc Erki (FErki).

» Home » Docs » Release notes » Release notes for 0.46

Release notes for 0.46

These are the changes in 0.46 release.

We want to thank all the people for contributing code and to fill bug reports. This helps making Rex better and better :)

Incompatible Changes

We're sorry, but this release comes with some incompatible changes. The most changes won't effect the majority of users, but we needed to change those things to fix some nasty things and to be more flexible in the future.


With Rex::Test it is possible to test your Rexfile on a local VM before executing the code on your servers. Rex::Test uses Rex::Box to create the VM, but currently it only supports VirtualBox VMs.

To create a test just create a new file inside a t directory: t/base.t.

use Rex::Test::Base;
use Data::Dumper;
use Rex -base;

test {
    my $t = shift;

    $t->name("ubuntu test");

    $t->vm_auth( user => "root", password => "box" );


    $t->has_content( "/etc/passwd", qr{root:x:0:}ms );

    run "ls -l";
    $t->ok( $? == 0, "ls -l returns success." );




Create clean development environments for your projects. Test your software in a production like environment.

With Rex/Boxes you can easily create your test environment with VirtualBox. You can use prebuild VM Images or roll your own. Read the quickstart guide to create your own environment in minutes.

# # CALL: # rex init --name=gpw --url=http://domain.tld/ubuntu-server-12.10-amd64.qcow2 desc "Initialize and start the VM: rex init --name=vmname [--url=http://...]"; task "init", make { my $param = shift;
box {
    <span class="hljs-keyword">my</span> (<span class="hljs-type">$box</span>) = <span class="hljs-type">@_</span>;
    <span class="hljs-type">$box</span>-&gt;<span class="hljs-type">name</span>( <span class="hljs-type">$param</span>-&gt;{name} );

    <span class="hljs-comment"># where to download the base image</span><span class="hljs-comment">

$box->url( $param->{url} );

    <span class="hljs-comment"># default is nat</span><span class="hljs-comment">

$box->network( 1 => { type => "nat", }, 2 => { type => "bridged", bridge => "br1", } );

    <span class="hljs-comment"># define the authentication to the box</span><span class="hljs-comment">

# if you're downloading one from box.rexify.org this is the default. $box->auth( user => "root", password => "box", );

    <span class="hljs-comment"># if you want to provision the machine,</span><span class="hljs-comment">

# you can define the tasks to do that $box->setup(qw/install_webserver/); };



Changes in the Cloud API

my $instance = cloud_instance create => { image_id => "80fbcb55-b206-41f9-9bc2-2dd7aac6c061", name => "myvm01", flavor => "performance1-1", networks => ["a733f9d7-098e-4bf1-881d-5a91e84b44bb"]; # networks is optional };

cloud_volume attach => $vol_id, to => $instance->{id};

-   Terminating an instance and removing the volume.

    <pre><code class="hljs">cloud_service "<span class="hljs-string">RackSpace</span>";

cloud_instance terminate => $instance->{id}; cloud_volume delete => $vol_id;



Proudly powered by Perl and built with Statocles

GitHub repository and discussions / Chat on Matrix and IRC / Mailing list on Google Groups (retired: rex-users@freelists)

MetaCPAN / Twitter / StackShare / Server Fault   -.ô.-   Disclaimer