(R)?ex the friendly automation framework

News

2020-02-05
Rex-1.8.1

The Rex-1.8.1 release is now available on CPAN, improving release automation, packaging, and documentation.

2020-01-05
Rex-1.8.0

The Rex-1.8.0 release is now available on CPAN, adding initial support to manage Void Linux systems.

2019-12-05
Rex-1.7.1

The Rex-1.7.1 release is now available on CPAN, fixing a Windows testing issue, and updating some docs.

2019-11-05
Rex-1.7.0

The Rex-1.7.0 release is now available on CPAN.

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.

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

Proudly powered by Statocles

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