Skip to content

Commit

Permalink
Merge pull request #4 from ltamaster/master
Browse files Browse the repository at this point in the history
new README and check script fix
  • Loading branch information
ltamaster authored May 7, 2018
2 parents 9d29053 + 52472b2 commit 820697c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ For further information see:
## Configuration

* **Authentication Type**: The authentication type used for the connection: basic, ntlm, credssp. It can be overwriting at node level using `winrm-authtype`
* **Username**: (Optional) Username that will connect to the remote node. This value can be set also at node level or as a job input option (with the name `username)
* **Password Storage Path**: Key storage path of the window's user password. It can be overwriting at node level using `winrm-password-storage-path`
* **No SSL Verification**: When set to true SSL certificate validation is not performed. It can be overwriting at node level using `winrm-nossl`
* **WinRM Transport Protocol**: WinRM transport protocol (http or https). It can be overwriting at node level using `winrm-transport`
Expand All @@ -64,7 +65,7 @@ For further information see:
winrm-authtype="credssp"/>
```

The username can be overwritten using a job input option called "username".
The username can be overwritten using a job input option called "username"` or it can be set at project level.

## Limitations

Expand Down
20 changes: 9 additions & 11 deletions contents/winrm-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
port = args.port

if args.nossl:
if args.nossl == "True":
if args.nossl == "true":
nossl = True
else:
nossl = False

if args.debug:
if args.debug == "True":
if args.debug == "true":
debug = True
else:
debug = False
Expand All @@ -67,7 +67,6 @@

endpoint=transport+'://'+hostname+':'+port


if(debug):
print "------------------------------------------"
print "endpoint:" +endpoint
Expand All @@ -77,16 +76,15 @@
print "transport:" + transport
print "------------------------------------------"




if(nossl):
session = winrm.Session(endpoint, auth=(username, password),
transport=authentication,
server_cert_validation='ignore')
session = winrm.Session(endpoint,
auth=(username, password),
transport=authentication,
server_cert_validation='ignore')
else:
session = winrm.Session(endpoint, auth=(username, password),
transport=authentication)
session = winrm.Session(endpoint,
auth=(username, password),
transport=authentication)

exec_command = "ipconfig"
result = session.run_cmd(exec_command)
Expand Down

0 comments on commit 820697c

Please sign in to comment.