Commit graph

10 commits

Author SHA1 Message Date
Jon Hawkesworth
a57b6ccf46 This change selects the certificate from the winrm configuration and attempts to find the expiry date from that.
Trond Hindenes pointed out that simply picking the first certificate from local computer certs is not guaranteed to select the correct certificate.
2014-09-01 21:22:18 +01:00
Jon Hawkesworth
e4b80dd43c Added null check in case http connection used and no cert found. 2014-08-31 16:20:50 +01:00
Trond Hindenes
72760f5999 All changes referenced in PRs #8767 , #8768 , #8769 :
This changes the get-attr function slightly, and lets the module specify whether a param is needed and auto-fails if it is not present. A module can now verify params like so::
 $params = Parse-Args $args;
 $result = New-Object psobject;
 Set-Attr $result "changed" $false;
 $path = Get-Attr -obj $params -name path -failifempty $true -resultobj $result

or

$params = Parse-Args $args;
 $result = New-Object psobject;
 Set-Attr $result "changed" $false;
 $path = Get-Attr -obj $params -name path -failifempty $true -emptyattributefailmessage "Oh man. You forgot the main part!" -resultobj $result

slight tweak in how the powershell module converts to json in order to support nested objects (allows for more complex facts, among others)

This script gathers some extended facts on windows hosts in a json array attribute called "ansible_interfaces". This info is needed for some network-related modules I'm working on. Required the update to powershell.ps1 to return deeply nested json objects.
2014-08-29 10:39:42 +02:00
Trond Hindenes
387759ada6 win_setup improvements: Correcly outputs ansible_totalmem on computers with multiple ram chips 2014-07-22 01:38:46 +02:00
Chris Church
f59041871e Fix typo in powershell setup module. 2014-06-21 10:27:43 -04:00
Paul Durivage
003448defc Add memory and IP information to setup 2014-06-19 14:25:27 -05:00
Matt Martz
97f4f56286 Add Exit-Json and Fail-Json powershell helper functions 2014-06-19 14:24:15 -05:00
Matt Martz
4f764fd3e7 setup.ps1 willnot support fact_path and filter to start 2014-06-19 14:24:14 -05:00
Matt Martz
f92f739366 Need to call ToString Platform to get the string 2014-06-19 14:24:14 -05:00
Matt Martz
09e538f954 Add start for powershell setup module 2014-06-19 14:24:13 -05:00