diff --git a/contents/winrm-filecopier.py b/contents/winrm-filecopier.py index 9fd4139..33fb93c 100644 --- a/contents/winrm-filecopier.py +++ b/contents/winrm-filecopier.py @@ -278,6 +278,9 @@ def winrm_upload(self, if "RD_CONFIG_CERTPATH" in os.environ: certpath = os.getenv("RD_CONFIG_CERTPATH") +if "RD_CONFIG_WINRMPROXY" in os.environ: + winrmproxy = os.getenv("RD_CONFIG_WINRMPROXY") + if "RD_OPTION_USERNAME" in os.environ and os.getenv("RD_OPTION_USERNAME"): #take user from job username = os.getenv("RD_OPTION_USERNAME").strip('\'') @@ -327,6 +330,8 @@ def winrm_upload(self, arguments["credssp_disable_tlsv1_2"] = diabletls12 +if(winrmproxy): + arguments["proxy"] = winrmproxy if not URLLIB_INSTALLED: log.error("request and urllib3 not installed, try: pip install requests && pip install urllib3") diff --git a/plugin.yaml b/plugin.yaml index 2bbe196..3c5fb35 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -323,6 +323,15 @@ providers: required: false renderingOptions: groupName: Kerberos + - name: winrmproxy + title: Proxy + description: "Specify a proxy address for communicating with Windows nodes. Example HTTP proxy strings are http://server:port and http://user:pass@server:port. An example SOCKS5 proxy string is socks5://user:pass@server:port." + type: String + required: false + scope: Instance + renderingOptions: + groupName: Connection + instance-scope-node-attribute: "winrm-proxy" - name: WinRMCheck title: WinRM Check Step description: Check the connection with a remote node using winrm-python