(R)?ex Deployment & Configuration Management

Search

News

2016-09-08

Work with (R)?ex at adjust! Check out their job posting for details, or contact our fellow core developer, FErki.

2016-07-16

(R)?ex 1.4.1 released, fixing many bugs. See the release notes for more details.

2016-03-07

(R)?ex 1.4.0 released, containing lots of goodies. See the release notes for more details.

2015-09-04

(R)?ex 1.3.3 released, fixing a bunch of bugs. See the release notes for more details.

2015-06-22

adjust GmbH is sponsoring the (R)?ex project with a new build server. Thank you for your support!

2015-06-17

(R)?ex 1.3.2 released, fixing issues related to file manipulation when run on BSDs. See the release notes for more details.

2015-06-08

(R)?ex 1.3.1 released, fixing Rex::Commands::DB related tests.

2015-05-27

Read the second part of "Rex in practice" series about Test-driven infrastructure.

2015-05-09

repositor.io 1.1.0 released. repositor.io is a repository management tool for apt, yum, yast and docker. This is a bugfix release with fixes for ubuntu and centos7 installation media mirroring.

2015-05-03

(R)?ex 1.2.0 released. See the release notes for more details.

2015-03-27

View the slides of the talk An introduction to Rex from Andy Beverley.

Conferences

2016-06-21

Training

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 » Other » A word on backward compatibility

A word on backward compatibility

Everyone knows the pain if something gets deprecated and one have to port his old (and stable) code to a new version of a library or a framework. There is enough work to do instead of fixing code to work with newer versions of them.

So there is one premise new versions of Rex has to fulfill. They must be backward compatible.

I know this might be impossible in the one or other way, but to minimize this danger there is a thing called feature flags. If there is the need to break backward compatibility in favor of a new feature there will be a feature flag for this change. And only if this feature flag gets enabled in the Rexfile it will break compatibility.

So the default is always to be compatible.

If you have a problem that occurs after an update, it is considered as a bug. Please report this bug in our issue tracker.

Feature flags

This is the current list of feature flags:

Flag Since Description
1.3 1.3 Activating the new template engine by default.
no_template_ng 1.3 Disabling the new template engine.
1.0 1.0 Disabling usage of a tty. This increases compatibility for remote execution. Furthermore, all features from earlier versions are activated.
no_autodie 1.0 Will disable autodie feature.
template_ng 0.56 Enabling the new template engine (better error reporting, etc.)
0.56 0.56 Will activate autodie feature. Furthermore, all features from earlier versions are activated.
autodie 0.56 Will enable autodie feature: die on all failed filesytem commands
0.55 0.55 Will activate using Net::OpenSSH by default if present. Furthermore, all features from earlier versions are activated.
0.54 0.54 Will activate checking services for existence before trying to manipulate them, and set() will overwrite already existing values (instead of concatenating). Furthermore, all features from earlier versions are activated.
0.53 0.53 Will activate register_cmdb_top_scope. And all things 0.51 and down activated.
register_cmdb_top_scope 0.53 Will register all cmdb top scope variables automatically in the templates.
0.51 0.51 Will load Rex::Constants and the CMDB by default. And all things 0.47 and down activated.
no_autodie 1.0 Will disable autodie feature.
no_path_cleanup 0.44 Rex cleans the path before executing a command. With this feature Rex doesn't cleanup the path.
verbose_run 0.47 Explicitly output "Successfully executed" or "Error executing" messages for run() commands.
source_profile 0.44 Source $HOME/.profile before running a command.
source_global_profile 0.44 Source /etc/profile before running a command.
exec_autodie 0.44 If you execute a command with run() Rex will die() if the command returns a RETVAL != 0.
exec_and_sleep 0.43 Sometimes some commands that fork away didn't keep running. With this flag rex will wait a few ms before exiting the shell.
disable_strict_host_key_checking   0.43 Disabling strict host key checking for openssh connection mode.
reporting 0.43 Enable reporting
empty_groups 0.42 Enable usage of empty groups.
use_server_auth 0.42 Enable the usage of special authentication options for servers.
tty 1.0 Enable pty usage for ssh connections. (Default)
no_tty 0.41 Disable pty usage for ssh connections.
no_local_template_vars 0.40 Use global variables in templates
sudo_without_sh 0.40 Run sudo commands directly without the use of 'sh'. This might break things.
sudo_without_locales 0.40 Run sudo commands without locales. this will break things if you don't use english locales.
exit_status 0.39 This option tells Rex to return a non zero value on exit if a task fails.
0.35 0.35 This option enables the features of 0.31 and the possibility to call tasks as a functions without the need to use a hash reference for the parameters.
0.31 0.31 To enable special authentication options for a server group. This will overwrite the default authentication options for a task.

 

Howto enable Feature Flags

You can enable feature flags in your Rexfile with the following code:

# Rexfile
use Rex -feature => ['0.31'];

or even multiple ones like this:

# Rexfile
use Rex -feature => [qw(exec_autodie source_profile)];

 

 

Fork me on GitHub
Google Group / Twitter / GitHub / Mailinglist / irc.freenode.net #rex   -.รด.-   Disclaimer