def _setup_winrm(self, node): """ Setup WinRM on a remote node :param node: the node to be polished :type node: :class:`libcloud.compute.base.Node` """ ip = node.private_ips[0] plogging.debug("Testing out quick function on %s", ip) out = run_cmd( 'echo hello', args=[], user=self.username, password=self.secret, host=ip) plogging.info(out) plogging.debug("Running winexe to remotely configure %s", ip) cmds = [ "winrm quickconfig -quiet", "winrm set winrm/config/service/auth @{Basic=\"true\"}", "winrm set winrm/config/service @{AllowUnencrypted=\"true\"}" ] for cmd in cmds: plogging.debug('Running command "%s"', cmd) out = run_cmd( cmd, args=[], user=self.username, password=self.secret, host=ip) plogging.info(out)
def run(self, host, password, username="******"): """ Setup WinRM on a remote node to accept non-cert trusted connections """ out = run_cmd("echo hello", args=[], user=username, password=password, host=host) cmds = [ "winrm quickconfig -quiet", 'winrm set winrm/config/service/auth @{Basic="true"}', 'winrm set winrm/config/service @{AllowUnencrypted="true"}', ] out = [run_cmd(cmd, args=[], user=username, password=password, host=host) for cmd in cmds] return {"stdout": out}
def run(self, host, password, username='******'): """ Setup WinRM on a remote node to accept non-cert trusted connections """ out = run_cmd('echo hello', args=[], user=username, password=password, host=host) cmds = [ "winrm quickconfig -quiet", "winrm set winrm/config/service/auth @{Basic=\"true\"}", "winrm set winrm/config/service @{AllowUnencrypted=\"true\"}" ] out = [ run_cmd(cmd, args=[], user=username, password=password, host=host) for cmd in cmds ] return {'stdout': out}
def run(self, host, command, password, username='******'): """ Run command on a remote node """ out = run_cmd(command, args=[], user=username, password=password, host=host) return {'stdout': out}
def run(self, host, command, password, username='******'): """ Run command on a remote node """ out = run_cmd( command, args=[], user=username, password=password, host=host) return {'stdout': out}
def run(self, host, password, username='******'): """ Setup WinRM on a remote node """ cmds = [ "winrm set winrm/config/service/auth @{Basic=\"false\"}", "winrm set winrm/config/service @{AllowUnencrypted=\"false\"}" ] out = [ run_cmd(cmd, args=[], user=username, password=password, host=host) for cmd in cmds ] return {'stdout': out}
def run(self, host, password, username='******'): """ Setup WinRM on a remote node """ cmds = [ "winrm set winrm/config/service/auth @{Basic=\"false\"}", "winrm set winrm/config/service @{AllowUnencrypted=\"false\"}" ] out = [ run_cmd( cmd, args=[], user=username, password=password, host=host) for cmd in cmds] return {'stdout': out}