Created
September 12, 2012 15:54
-
-
Save krimdomu/3707632 to your computer and use it in GitHub Desktop.
Rex and multiple files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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