(R)?ex the friendly automation framework

News

2021-03-05
Rex-1.13.3

The Rex-1.13.3 release is now available on CPAN. It contains documentation updates, and a fix for debconf parsing. Behind the scenes, CI was migrated over to GitHub Actions as well.

2020-12-05
Rex-1.13.2

The Rex-1.13.2 release is now available on CPAN. It contains only documentation updates, mostly for the built-in template capabilities, but also fixes a few typos.

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.

Events

2021-03-08
Learning automation using Rex

Ferenc Erki (FErki) will be the guest of Gábor Szabó on the next Code Maven live stream to learn about automation using Rex. Register for the free event via Code Maven or Meetup, and join the discussion!

2020-03-05
Unexpected use cases with Rex

Unexpected use cases with Rex at the 22nd German Perl/Raku Workshop 2020 in Erlangen by Ferenc Erki (FErki).

2019-11-09
Rex & Friends

Rex & Friends talk at the Barcelona Perl & Friends 2019 by Ferenc Erki (FErki).

» Home » Docs » Release notes » Release notes for 1.0.0

Release notes for 1.0.0

We are proud to announce the 1.0.0 release of Rex. We want to thank every contributor that made this first major release possible. Rex 1.0 will be a LTS release, which means that it will get support from the community (at least) until march 2017.

We're developing Rex for more than 4 years and because Rex is now used in many production environments we felt it was the right time to release the first major version. We try to follow the semver versioning scheme, so that it is possible to have a good deprecation path if things change.

Rex is a project completely driven by volunteers and without all the support from the community by using it, sending bug reports and feature requests and submitting patches it wouldn't be the great project it is. So many thanks to all of you. If you want to help developing Rex and become part of the core team, feel free to contact us on irc (irc.freenode.net / #rex).

These are the changes in 1.0.0 release.

Common

With Rex 1.0 we changed the communication from libssh2 (Net::SSH2) to openssh (Net::OpenSSH) by default, because many of us already uses this and it was also the default if featureset 0.55 was enabled.

But you can always use the old communication with the following command:

set connection => 'SSH';

augeas

With augeas it is possible to edit configuration files without the need to use templates and to overwrite all of the file. So if you want to allow people to edit the configuration files on your servers also by hand (for example on test machines for your developers) you can use augeas to ensure that some specific parameters in these configuration files are set.

To use this it is required to have augtool installed on your servers. This is usually in the package augeas or augeas-tools.

use Rex::Commands::Augeas;

task "prepare", sub {
    augeas
      insert    => "/files/etc/hosts",
      label     => "01",
      after     => "/7",
      ipaddr    => "192.168.2.23",
      canonical => "frontend01";

    augeas modify                                  =>
      "/files/etc/ssh/sshd_config/PermitRootLogin" => "without-password",
      on_change                                    => sub {
        service sshd => "restart";
      };
};

PkgConf

The PkgConf commands are especially usefull on debian/ubuntu systems to query and to modify package configurations. For example if you want to configure the mysql root password during package installation. To see more example please refer to the API documentation.

use Rex::Commands::PkgConf;

task "prepare", sub {
    set_pkgconf(
        "mysql-server-5.5",
        [
            {
                question => 'mysql-server/root_password',
                type     => 'string',
                value    => 'mysecret'
            },
            {
                question => 'mysql-server/root_password_again',
                type     => 'string',
                value    => 'mysecret'
            },
        ]
    );
};

tty usage

If you're using use Rex -feature => ['1.0']; tty usage is disabled. This increases the compatibility with some init scripts that don't disown from the running tty. If you're using sudo then you need to configure the user to not need a tty to run sudo.

Defaults:username !requiretty

If you can't change this behaviour you can always use the tty feature to tell Rex to spawn a tty.

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

base

Internal

Testing

Bugfixes

Proudly powered by Statocles

GitHub / IRC / Twitter / Google Groups / StackShare / Mailing list / Server Fault   -.ô.-   Disclaimer