[ANN] 'tsshbatch' Server Automation Tool Version 1.317 Released

Tim Daneliuk tundra at tundraware.com
Wed Oct 19 23:02:59 UTC 2016

'tsshbatch' Version 1.317 is now released and available for download at:


This is a major update with important bug fixes and improvements.  Existing
users will want to update sooner rather than later.

The last public release was 1.228.

What Is 'tsshbatch'?

'tsshbatch' is a server automation tool to enable you to issue commands
to many servers without having to log into each one separately.  When
writing scripts, this overcomes the 'ssh' limitation of not being able to
specify the password on the command line.

'tsshbatch' has a sophisticated inventory management system (host
files) as well as a mechanism for organizing libraries of standard jobs 
(command files).  Both local and global variables may be defined and/or
used in either.

'tsshbatch' also understands basic 'sudo' syntax and can be used
to access a server, 'sudo' a command, and then exit.

'tsshbatch' thus allows you to write complex, hands-off scripts that
issue commands to many servers without the tedium of manual login and
'sudo' promotion.  System administrators, especially, will find this
helpful when working in large server farms.

'tsshbatch' is written in Python and requires the 'paramiko library.
It has been tested on a number of Linux and FreeBSD variants.

See Also: https://en.wikipedia.org/wiki/Tsshbatch

Related: Ansible, Capistrano, ClusterSSH, Fabric, PSSH, Rundeck 

WHATSNEW For 'tsshbatch' 1.317    (Sat Oct 15 16:12:34 CDT 2016)

  - It is now possible to define local variables with the
    .local directive.  These have visibility and scope only
    with the file where they are defined, but otherwise work
    the same as globally defined variables.  Local variables
    also support "execution variable" style definition.

  - Hostfile names must now be passed using the -i option.  The
    argument can be the name of a single file or a quoted list of
    files.  The option can appear on the command line more than once.
    -H and -i can be used together to create custom host lists.

  - The -L option will list all (if any) host- and command files found
    on their respective search paths.

  - The -W option will write out the inventory of hosts that would be
    processed if you actually executed the program, and then
    terminates.  This works only in test mode.  This allows you
    to embed tsshbatch in external shell scripts like this:

       for server in $(tsshbatch.py -i devserverlist -uatserverlist -W)
         ssh $server

    Why?  Because tsshbatch has lots of powerful ways to maintain
    inventories of hosts and combine them through includes and
    multiple command line arguments.  The -W option makes it
    convenient for external programs to make use of those inventory

  - The -F "string ..."  option will examine every file on the host-
    or command paths, looking for matching strings within these files.
    Matches will report the file name, the location within the file,
    and the line containing any of the specified strings.

    This is a simple, case-insensitive string literal match and does
    not support regular expressions.

    This is handy when you're looking for a host name or command
    string, say like, "sudo", and you don't want to have to manually
    go through all your support files.

  - The -V "string ..." option does the exact opposite of -F.  It
    lists all the files that do NOT contain any of the specified

  - The -r option has been added to suppress reporting of start/stop
    statistics.  This allows you to make statistics reporting the
    default, say via the $TSSHBATCH environment variable, but
    override it when you need to.

  - A new directive, .notify, tells tsshbatch to print an informative
    message from within a command file.  This is a runtime activity
    and is helpful, for example, when tracking progress of a long
    command file. Notifications are disabled in silent mode.


  - The -H option can now appear on the command line multiple times
    thereby creating an aggregate list of all hosts named therein.

  - Hostfiles must now be passed as an argument of -i.  This was
    done to provide a consistent way of passing multiple host
    files on the commandline.

  - .include targets (file name specifications) may now reference
    previously defined variables.


  - File transfers now properly honor the -s (silent output) flag.

Tim Daneliuk     tundra at tundraware.com
PGP Key:         http://www.tundraware.com/PGP/

More information about the freebsd-questions mailing list