Skip to content

Instantly share code, notes, and snippets.

@ferki
Created October 23, 2016 03:19
Show Gist options
  • Select an option

  • Save ferki/cf930873e76b67634955c171368cdaa1 to your computer and use it in GitHub Desktop.

Select an option

Save ferki/cf930873e76b67634955c171368cdaa1 to your computer and use it in GitHub Desktop.
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