The script allows to run in sequence or parallel some scripts on remote hosts.
The list of servers can be choosen by pattern from aws account region or maestro region.
- jq
- aws-cli (if aws cloud will be used)
- maestro-cli (if maestro cloud will be used)
The script uses it's name to detect a region. Just create a soft link to the real script and add a configuration file (see run.in.cfg.sample) Example:
- The config file: run.in.cfg.eu-west-1
- The soft link: run.in.eu-west-1.sh
NB. All connect to remote hosts will be done only with ssh key!!!
- without options returns the list of hosts from a region
- -g - regex pattern of host in the list
- -p - run in purallel
- -ss - make summary of execution results
- all other will be recognized as the script to run on remote hosts (if it is an exiting file the file will be copied and run)
- -s - show list to do ssh to chosen host
- see more in the script
- use getopt
- process ansible inventory
run.in.eu-west-1.sh -g oracle -p sh -c 'uname -a ; uptime'