(R)?ex Deployment & Configuration Management

News

2019-07-02
Deprecating official Rex packages

As part of our efforts to simplify maintenance around RexOps projects, we have decided to stop building Rex packages on our side. We recommend relying on OS packages maintained by the various distributions in their respective upstream repositories, or to install Rex from CPAN.

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 » Guides » Cheat Sheet

Cheat Sheet

Executing a command and parsing its output

run($command, %options)

Run a remote command and returns its output.

Options

Example to just run a command if a file doesn't exists

run "/tmp/install_service.sh",
  creates => "/opt/myservice/conf.xml";

Example to run a command and get its output

my @output_lines = run "df -h";

Installing and configuring a service

The most used functions in configuration management is installing/managing services and managing configuration files. In Rex you can do this with the file, pkg and service functions.

file($remote_file, %options)

Manage files on remote systems.

Options

pkg($name, %options)

Install a package on the remote system.

Options

service

Manage the state of a service.

This function can be called as a resource or as a normal function to directly stop/start/restart/... services.

Options (for calling as a resource)

Example for calling as resource

service "nptd",
  ensure => "started";

Example for calling as function

service ntpd => "restart";

Managing Cron

Manage cron jobs.

cron_entry($entry_name, %options)

Options

Managing users and groups

Manage local user database.

account($user_name, %options)

Manage user accounts.

Options

group($group_name, %options)

Manage groups.

Options

Google Group / Twitter / GitHub / Mailinglist / irc.freenode.net #rex   -.ô.-   Disclaimer