Skip to content

Instantly share code, notes, and snippets.

@krimdomu
Created September 12, 2012 15:54
Show Gist options
  • Save krimdomu/3707632 to your computer and use it in GitHub Desktop.
Save krimdomu/3707632 to your computer and use it in GitHub Desktop.
Rex and multiple files
# Rexfile
group "webservers" => "srv1", "srv2";
group "database" => "db1", "db2";
require Webservers;
require Databases;
###
# File: lib/Webservers.pm
package Webservers;
use Rex -base;
task "prepare", group => "webservers", sub {
};
1; # the last line of the file
####
# File: lib/Databases.pm
package Databases;
use Rex -base;
task "prepare", group => "databases", sub {
};
1; # the last line of the file
#### and then call the tasks
bash# rex Webservers:prepare
bash# rex Databases:prepare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment