App::SSH::Cluster - CLI to Net::OpenSSH that runs the same command via SSH on many remote servers at the same time
version 0.004
use App::SSH::Cluster; App::SSH::Cluster->new_with_options;
Simple application to execute the same remote command across one or more remote servers. This module does *not* handle errors that are generated from remote commands and currently does not log the STDERR of the remote commands that are executed. Any error handling will need to implementing in the calling code.
App::SSH::Cluster
command
command to run on remote servers
config_file
Absolute path to YAML configuration file that defines the listing of servers, users, and identity-files. If no config_file is supplied, the default file .app-clusterssh.yml is assumed in the users home directory.
run
Runs the supplied command (--command <command> or -c <command>) on each remote server. Logging STDOUT to separate files then dumping STDOUT in blocks labelled by the name of the host the STDOUT is from
The follow items are required for *each* server that you wish to run commands on:
identity_file
absolute path to the SSH private key to use to connect
user
name of user to connect to remote server as
hostname
name of remote host
each of these may be defined globally or for each individual server, individual server options take precedence. Global options will be used if any individual options are not listed.
identity_file: "/home/hunter/.ssh/id_rsa" servers: - hostname: bastion user: hunter identity_file: "/home/hunter/.ssh/bastion_rsa" - hostname: asphodel user: hades
or
identity_file: "/home/hunter/.ssh/id_rsa" user: hunter servers: - hostname: bastion - hostname: asphodel - hostname: localhost
Hunter McMillen <mcmillhj@gmail.com>
This software is copyright (c) 2015 by Hunter McMillen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::SSH::Cluster, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::SSH::Cluster
CPAN shell
perl -MCPAN -e shell install App::SSH::Cluster
For more information on module installation, please visit the detailed CPAN module installation guide.