From 4851197de2e4eb0657dfa5557edf3d5ca4030c0b Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Fri, 18 Mar 2016 12:31:06 +0100 Subject: [PATCH] Reseting to original manually (limited connect). Limited connectivity, but have extra time, so reseting this to original. This new feature will be implemented in separate branch. --- scripts/cdist | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/scripts/cdist b/scripts/cdist index 8aa998d2..39449666 100755 --- a/scripts/cdist +++ b/scripts/cdist @@ -2,7 +2,6 @@ # -*- coding: utf-8 -*- # # 2010-2013 Nico Schottelius (nico-cdist at schottelius.org) -# 2016 Darko Poljak (darko.poljak at gmail.com) # # This file is part of cdist. # @@ -21,34 +20,6 @@ # # -def inspect_ssh_mux_opts(): - import subprocess - - """Inspect whether or not ssh supports multiplexing options""" - wanted_mux_opts = { - "ControlPath":"~/.ssh/master-%l-%r@%h:%p", - "ControlMaster":"auto", - "ControlPersist":"125", - } - # if checked key option is present then this assumes - # all options in value are present - check = { - "ControlMaster": ("ControlMaster", "ControlPath"), - "ControlPersist": ("ControlPersist",), - } - mux_opts = {} - for x in check: - try: - subprocess.check_output("ssh -o {}".format(x), - stderr=subprocess.STDOUT, shell=True) - except subprocess.CalledProcessError as e: - foo = e.output.decode().lower() - if not "bad configuration option" in foo: - for o in check[x]: - mux_opts[o] = wanted_mux_opts[o] - foo = [" -o {}={}".format(x, mux_opts[x]) for x in mux_opts] - return " ".join(foo) - def commandline(): """Parse command line""" import argparse @@ -82,11 +53,6 @@ def commandline(): parser['banner'].set_defaults(func=cdist.banner.banner) # Config - # inspect multiplexing options for default remote copy/exec scp/ssh - MUX_OPTS = inspect_ssh_mux_opts() - cdist.REMOTE_EXEC += MUX_OPTS - cdist.REMOTE_COPY += MUX_OPTS - parser['config'] = parser['sub'].add_parser('config', parents=[parser['loglevel']]) parser['config'].add_argument('host', nargs='+',