Skip to content

Instantly share code, notes, and snippets.

@spicyjack
Created August 23, 2014 14:08
Show Gist options
  • Save spicyjack/a2fa6eff617cdb9d647e to your computer and use it in GitHub Desktop.
Save spicyjack/a2fa6eff617cdb9d647e to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Rex -feature => qw/use_server_auth/;
use Rex::Commands::Gather;
use Rex::Group::Lookup::INI;
groups_file q(../servers.ini);
desc "Get info about the servers in 'servers.ini'";
### TASK: uptime
task q(uptime), group => q(servers), sub {
my $output = run q(uptime);
say $output;
};
### TASK: system_info
task q(system_info), group => q(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