(R)?ex the friendly automation framework

News

2020-11-05
Rex-1.13.1

Happy 10th birthday, Rex!

The Rex-1.13.1 release is now available on CPAN. It is focusing on CMDB bugfixes and documentation, while also fixing a missing feature flag. Upgrade is recommended for all users.

2020-10-05
Rex-1.13.0

The Rex-1.13.0 release is now available on CPAN. It adds on_no_change hooks for file management commands to trigger further actions when files are left unchanged. Upgrade is recommended for all users.

2020-09-05
Rex-1.12.2

The Rex-1.12.2 release is now available on CPAN. It fixes various regressions, as well as bugs around file management. Upgrade is highly recommended for all users.

2020-08-05
Rex-1.12.1

The Rex-1.12.1 release is now available on CPAN. It adds documentation for feature flags, and fixes a release packaging issue.

2020-07-05
Rex-1.12.0

The Rex-1.12.0 release is now available on CPAN. It adds support for local rsync operations, improves tab completion for Bash and Zsh, and fixes related bugs. It also discontinues support for running Rex on Windows 7, Windows Server 2008 R2, and older versions since both mainstream and extended support has already ended for these products.

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