Created
October 23, 2016 03:19
-
-
Save ferki/cf930873e76b67634955c171368cdaa1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| use Rex -feature => [ '1.4', 'exec_autodie' ]; | |
| user 'myuser'; | |
| environment production => sub { | |
| group destination => 'server1'; | |
| }; | |
| environment staging => sub { | |
| group destination => 'server2'; | |
| }; | |
| no_ssh task 'a', sub { | |
| where_am_i(); | |
| }; | |
| task 'b', | |
| group => 'destination', | |
| sub { | |
| where_am_i(); | |
| LOCAL { | |
| where_am_i(); | |
| }; | |
| }; | |
| batch 'deploy' => qw(a b); | |
| sub where_am_i { | |
| say run 'hostname'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment