(R)?ex Deployment & Configuration Management

News

2019-06-09
Post-migration updates & clean-up

Over the course of the past weeks many clean-ups have been done, reaping the benefits provided by our new Statocles-based site:

2019-05-19
New site engine for rexify.org

After months of work on a new site backend, we reached the MVP today for our site to be switched over to a new engine: from now on, our site will be maintained using the static site generator Statocles.

Conferences

2016-06-21

Need Help?

Rex is a pure open source project, you can find community support in the following places:

Professional support is also available.

» Home » Docs » Rex book » Working with files and packages » Installing Packages

Installing Packages

Installing packages is easy. You can use the pkg function for this.

use Rex -feature => ['1.0'];

user "root";
password "f00b4r";

task "prepare_system", group => "frontends", sub {
   pkg "apache2",
     ensure => "present";
};

If you have to install multiple packages you can use an array so that you don't have to write that much.

use Rex -feature => ['1.0'];

user "root";
password "f00b4r";

task "prepare_system", group => "frontends", sub {
   pkg ["apache2", "libphp5-apache2", "mysql-server"],
     ensure => "present";
};

If you need to write a distribution independent module you can also use the case statement.

user Rex -base;

user "root";
password "f00b4r";

task "prepare_system", group => "frontends", sub {
   my $packages = case operating_system,
      Debian => ["apache2", "libphp5-apache2"],
      CentOS => ["httpd", "php5"],

   pkg $packages,
     ensure => "present";
};
Google Group / Twitter / GitHub / Mailinglist / irc.freenode.net #rex   -.ô.-   Disclaimer