From owner-freebsd-questions@freebsd.org Wed Oct 19 23:02:59 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F336C199F0 for ; Wed, 19 Oct 2016 23:02:59 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from oceanview.tundraware.com (oceanview.tundraware.com [45.55.60.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "oceanview.tundraware.com", Issuer "oceanview.tundraware.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 083D5B7F for ; Wed, 19 Oct 2016 23:02:57 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from [192.168.0.2] (ozzie.tundraware.com [75.145.138.73]) (authenticated bits=0) by oceanview.tundraware.com (8.15.2/8.15.2) with ESMTPSA id u9JMWGLo098843 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 19 Oct 2016 17:32:17 -0500 (CDT) (envelope-from tundra@tundraware.com) From: Tim Daneliuk Subject: [ANN] 'tsshbatch' Server Automation Tool Version 1.317 Released X-Mozilla-News-Host: news://ozzie.tundraware.com To: FreeBSD Mailing List Message-ID: Date: Wed, 19 Oct 2016 17:32:11 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (oceanview.tundraware.com [45.55.60.57]); Wed, 19 Oct 2016 17:32:17 -0500 (CDT) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: u9JMWGLo098843 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 23:02:59 -0000 'tsshbatch' Version 1.317 is now released and available for download at: http://www.tundraware.com/Software/tsshbatch 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) do ssh $server done 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 features. - 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 strings. - 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. [CHANGES] - 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. [BUG FIXES] - File transfers now properly honor the -s (silent output) flag. ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/