Rex - Remote Execution
(R)?ex is a small script to ease the execution of remote commands. You can write small tasks in a file named Rexfile.
You can find examples and howtos on http://rexify.org/
Web Site: http://rexify.org/
IRC: irc.freenode.net #rex
Bug Tracker: https://rt.cpan.org/Dist/Display.html?Queue=Rex
Twitter: http://twitter.com/jfried83
Net::SSH2
Expect
Only if you want to use the Rsync module.
DBI
Only if you want to use the DB module.
desc "Show Unix version"; task "uname", sub { say run "uname -a"; }; bash# rex -H "server[01..10]" uname
See Rex::Commands for a list of all commands you can use.
Returns the current connection as a hashRef.
The server name
1 if it is a ssh connection, 0 if not.
Returns 1 if the current connection is a ssh connection. 0 if not.
Returns the sftp object for the current ssh connection.
To install Rex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rex
CPAN shell
perl -MCPAN -e shell install Rex
For more information on module installation, please visit the detailed CPAN module installation guide.