Commit Graph

11 Commits (2664de55fb7bd36459575acd62762d3ae4155ea7)

Author SHA1 Message Date
Jon Hawkesworth e37b63386c Revised following comments from Chris Church.
Now uses sha1 checksums following merge of 9688.
Also I undid the changes I made to fetch.py
win_template.py now uses conn.shell.has_trailing_slash and
conn.shell.join_path
updated integration tests.
2014-12-16 04:47:01 +00:00
root bf916fb58a Adding first pass at win_copy, win_file and win_template modules. 2014-12-16 04:47:01 +00: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
Matt Martz 09dd535296 Make helper functions more robust against undefined powershell objects 2014-06-19 14:26:36 -05:00
Matt Martz df8866b8bd Add examples for how to use powershell common functions 2014-06-19 14:25:50 -05:00
Matt Martz e4e610565c Add convenience function (Get-Attr) for getting an attribute/member from a powershell psobject 2014-06-19 14:25:50 -05:00
Matt Martz 90c98ada7c Add ConvertTo-Bool filter function in powershell common code 2014-06-19 14:25:50 -05:00
Chris Church 243cd877ae Add integration tests for fetch/slurp, make powershell fetch/slurp work as close as possible to existing fetch/slurp modules. 2014-06-19 14:25:28 -05:00
Matt Martz 97f4f56286 Add Exit-Json and Fail-Json powershell helper functions 2014-06-19 14:24:15 -05:00
Matt Martz a25c441300 Add shared functions to module_utils/powershell.ps1 and refactor powershell modules to utilize the common powershell code 2014-06-19 14:24:13 -05:00
Michael DeHaan 627ff30a6f Add module replacer capability for powershell files. 2014-06-17 12:30:34 -05:00