» Home » Docs » Release notes » Release notes for 0.47.0
Release notes for 0.47.0
These are the changes in 0.47 release.
We want to thank all the people for contributing code and to fill bug reports. This helps making Rex better and better :)
Security
- Use https to communicate with Amazon (Cloud).
Rex::Test
With Rex::Test it is possible to test your Rexfile on a local VM before executing the code on your servers.
Rex::Box now also works with KVM
use Rex::Test::Base; use Data::Dumper; use Rex -base;
test { my $t = shift;
<span class="hljs-type">$t</span>-><span class="hljs-type">name</span>("<span class="hljs-string">ubuntu test</span>");
<span class="hljs-type">$t</span>-><span class="hljs-type">base_vm</span>("<span class="hljs-string">http://box.rexify.org/box/ubuntu-server-12.10-amd64.img</span>");
<span class="hljs-type">$t</span>-><span class="hljs-type">vm_auth</span>( user => "<span class="hljs-string">root</span>", password => "<span class="hljs-string">box</span>" );
<span class="hljs-type">$t</span>-><span class="hljs-type">run_task</span>("<span class="hljs-string">setup</span>");
<span class="hljs-type">$t</span>-><span class="hljs-type">has_package</span>("<span class="hljs-string">vim</span>");
<span class="hljs-type">$t</span>-><span class="hljs-type">has_package</span>("<span class="hljs-string">ntp</span>");
<span class="hljs-type">$t</span>-><span class="hljs-type">has_package</span>("<span class="hljs-string">unzip</span>");
<span class="hljs-type">$t</span>-><span class="hljs-type">has_file</span>("<span class="hljs-string">/etc/ntp.conf</span>");
<span class="hljs-type">$t</span>-><span class="hljs-type">has_service_running</span>("<span class="hljs-string">ntp</span>");
<span class="hljs-type">$t</span>-><span class="hljs-type">has_content</span>( "<span class="hljs-string">/etc/passwd</span>", qr{root:x:0:}ms );
run "<span class="hljs-string">ls -l</span>";
<span class="hljs-type">$t</span>-><span class="hljs-type">ok</span>( <span class="hljs-variable">$?</span> == 0, "<span class="hljs-string">ls -l returns success.</span>" );
<span class="hljs-type">$t</span>-><span class="hljs-type">finish</span>;
};
1;
Base
Read server groups from xml file - nathanIL
use Rex::Group::Lookup::XML; group_xml "file.xml";
<configuration> <group name="database"> <server name="machine01" user="root" password="foob4r" sudo="true" hdd="300" loc="/opt" /> </group> <group name="application"> <server name="machine01" user="root" password="foob4r" sudo="true" hdd="50" loc="/export" /> <server name="machine02" user="root" password="foob5r" sudo="true"/> </group> <group name="profiler"> <server name="machine03" user="root" password="blue123"/> </group> </configuration>
It is now possible to define before, around and after hooks for all tasks in one namespace with the
ALL
keyword.before ALL => sub { }
Extended service() resource, so that it is now possible to define what it should do for the different actions.
task "prepare", sub { service "apache2", ensure => "started", start => "/usr/local/bin/httpd -f /etc/my/httpd.conf", stop => "killall httpd", status => "ps -efww | grep httpd", restart => "killall httpd && /usr/local/bin/httpd -f /etc/my/httpd.conf", reload => "killall httpd && /usr/local/bin/httpd -f /etc/my/httpd.conf"; };
Syntax enhancement of group command #369 - Jens Berthold
group "g1", "srv1" => { user => "other" }, "srv2";
Package-Management with pkgng on FreeBSD 10
Amazon Linux is now detected properly.
Added MacOSX (Darwin) Network inventory module
Ident task description when running -T - Nathan Abu
added exclude option to sync commands - Cameron Daniel
Bugfixes
Update default VNC listen address for KVM machines - FErki
Fixed two problems where rsync can't authenticate on the remote host
Fixed run() command when used with callback and environment - alex1line
shell_path variable is not checked for empty value before use #376 - Ilya Evseev
Avoid warning if there's nothing to upgrade (update_system) - FErki
Fixed compatibility with perl 5.20. - FErki
Fixed a problem in the user management module if no /etc/shadow file was present.
Fixed inline templates in modules