bitreich-drist

fork of bitreich.org/drist
git clone git://git.pyratebeard.net/bitreich-drist.git
Log | Files | Refs | README | LICENSE

commit 5d0d7b60b0309be640dd3848a02b110da29f24da
parent 472555bd1aa95a6edff48b433e6bb095feb7ebe1
Author: Solene Rapenne <solene@perso.pw>
Date:   Thu, 27 Aug 2020 15:21:11 +0200

Drist now supports looping over hostname list or a file containing hostnames

Diffstat:
MCHANGELOG | 11+++++++++--
Mdrist | 2+-
Mdrist.1 | 23++++++++++++++++-------
3 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,5 +1,12 @@ -V2.00 -======= +V2.01 - 2020-08-27 +================== + +- Document the use of a file containg hostnames and that + drist now supports looping over multiple servers + + +V2.00 - 2020-08-26 +================== /!\ This update involves major changes, don't use it unless you can afford to rewrite all your drist modules. diff --git a/drist b/drist @@ -90,7 +90,7 @@ fi # start looping over server list if [ -f "$1" ] then - SERVER_LIST="$(cat $1 | tr '\n' ' ')" + SERVER_LIST="$(tr '\n' ' ' < $1)" else SERVER_LIST="$@" fi diff --git a/drist.1 b/drist.1 @@ -5,36 +5,45 @@ .Nm drist .Nd dumb remote installer shell tool, a remote deployment tool .Sh SYNOPSIS -.Nm .Op Fl p .Op Fl n .Op Fl d .Op Fl s Op Fl e Ar sudo|doas -.Ar server ... +.Ar destination .Sh OPTIONS -.Op Fl p +.Bl -tag -width Ds +.It Op Fl p to use persistent ssh connection, allowing to ssh only once for the differents steps. This uses ControlMaster feature from .Xr ssh 1 . -.Op Fl n +.It Op Fl n to simulate. Tells .Nm to show what will happens if it runs. This will make a ssh connection to check the remote hostname. -.Op Fl d +.It Op Fl d to truncate reported hostname. Tells .Nm to truncate the reported remote hostname to the left-most component. -.Op Fl s +.It Op Fl s use a program to execute a command as root on the remote server. Default is sudo. -.Op Fl e Ar binary +.It Op Fl e Ar binary binary to use for executing the commands as root. This flag is only useful when used with .Fl s . +.It Ar destination +Specify the remote servers you want drist to work on. +.Ar destination +can be a file containing a list of hosts, one per line or +it can be addresses passed in the command line. +If you specify multiples servers, +.Nm +will loop over the list respecting the list order. +Note that only one file can be used in the command line. .Sh DESCRIPTION .Nm is a tool to configure remote servers using