Skip to content

Instantly share code, notes, and snippets.

@spicyjack
Created August 24, 2014 13:53
Show Gist options
  • Save spicyjack/ffab5856a29b21c2e42d to your computer and use it in GitHub Desktop.
Save spicyjack/ffab5856a29b21c2e42d to your computer and use it in GitHub Desktop.
use strict;
use warnings;
#use Rex -feature => [qw/use_server_auth/];
use Rex -feature => qw/use_server_auth/;
use Rex::Commands::Gather;
use Rex::Group::Lookup::INI;
groups_file "../servers.ini";
#group servers => qw/foo bar/;
desc "Get info about the servers in 'servers.ini'";
#TASK: uptime
task 'uptime', group => 'servers', sub {
my $output = run q(uptime);
say $output;
};
#TASK: system_info
task 'system_info', group => 'servers', sub {
say dump_system_information();
};
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment