(R)?ex the friendly automation framework

News

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.

2020-06-09
Rex on StackShare

Thanks to the support from their amazing team, Rex is now listed on StackShare.

2020-06-05
Rex-1.11.0

The Rex-1.11.0 release is now available on CPAN. It enhances the behaviour of sysctl and file management, fixes bugs about group management and OpenSSH connection options, and clarifies quite a bit of documentation.

2020-05-05
Rex-1.10.0

The Rex-1.10.0 release is now available on CPAN (changelog). Apart from documentation updates and bug fixes, it adds initial package glob support, and an on_change hook for the mkdir command.

2020-04-05
Rex-1.9.0

The Rex-1.9.0 release is now available on CPAN, and it adds a new feature flag to force writing UTF-8 encoded files, documents configuration options, and fixes bugs.

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