Commit graph

68 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
Chris Church
0d1197a995 Replace Get-FileHash with MD5 code that works on PowerShell 3. 2014-08-28 01:42:22 -04:00
Michael DeHaan
6c42cd09f9 Merge pull request #8227 from trondhindenes/win_setup_improvements
win_setup improvements: Correcly outputs ansible_totalmem
2014-08-08 12:42:41 -04: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
Trond Hindenes
d5a0c18170 Better result handling 2014-07-10 12:00:00 +02:00
Trond Hindenes
3bf16805e1 improvements to win_feature 2014-07-08 18:04:12 +02:00
Chris Church
efc07cf627 Return service name, display name, start mode and state from win_service module. 2014-07-02 08:12:40 -04:00
Michael DeHaan
4acc93b665 Merge pull request #7889 from chrishoffman/win_group
Adding win_group module
2014-06-22 11:26:27 -05:00
Chris Hoffman
0dab7b014b Adding win_group module 2014-06-22 09:01:04 -04:00
Chris Hoffman
1c2d244964 Fixing bug with stopped state 2014-06-21 22:01:02 -04:00
Chris Hoffman
844e90093b Better propagation of cmdlet errors 2014-06-21 21:59:53 -04:00
Chris Hoffman
31f5069212 Using generic windows service for example 2014-06-21 21:58:26 -04:00
Michael DeHaan
1d632d65ae Merge pull request #7881 from cchurch/devel
Fix typo in powershell setup module.
2014-06-21 11:31:35 -05:00
Chris Hoffman
8af38ae436 Adding win_service module 2014-06-21 12:04:11 -04:00
Chris Church
f59041871e Fix typo in powershell setup module. 2014-06-21 10:27:43 -04:00
Simon Olofsson
5fe8cf1948 win_feature: Fix Description. 2014-06-20 17:14:36 +02:00
Paul Durivage
e6cd216ade Check .GetType rather than object directly 2014-06-19 16:41:24 -05:00
Paul Durivage
319f32e408 Move check down for access to 2014-06-19 16:41:05 -05:00
Paul Durivage
07267659b0 Rename variable 2014-06-19 16:40:35 -05:00
Paul Durivage
08dc72b5e7 Update documentation 2014-06-19 16:40:18 -05:00
Paul Durivage
6dd9434707 Fix so it only deletes users that exist 2014-06-19 16:25:02 -05:00
Paul Durivage
08c0b7e66e Remove commented out lines 2014-06-19 16:25:02 -05:00
Paul Durivage
03f69ac6c8 Fix incorrect name 2014-06-19 16:25:02 -05:00
Paul Durivage
29a308a233 Move functions to top for correct scope 2014-06-19 16:25:02 -05:00
Paul Durivage
556ff9b7f1 Refactor of win_user module 2014-06-19 16:25:01 -05:00
Matt Martz
8816ebb3f8 Add documentation for win_user module 2014-06-19 15:38:19 -05:00
Matt Martz
2316b7785c Make sure the doc stubs for windows modules have proper license headers 2014-06-19 14:27:04 -05:00
Matt Martz
adc4e70c75 Make sure the module name is specified correctly in the win_feature docs 2014-06-19 14:27:03 -05:00
Paul Durivage
61a06473ec Add documentation for win_feature module 2014-06-19 14:26:47 -05:00
Paul Durivage
bceaf96fd6 Add comments 2014-06-19 14:26:37 -05:00
Paul Durivage
10a526e020 Add restart functionality 2014-06-19 14:26:36 -05:00
Paul Durivage
ab8f7289b0 Renaming and refactoring of names, variables 2014-06-19 14:26:36 -05:00
Chris Church
f86db3a4dc Update slurp/win_ping/win_stat to use Get-Attr. 2014-06-19 14:26:36 -05:00
Paul Durivage
7e055ec6cc Remove unnecessary obj 2014-06-19 14:26:10 -05:00
Chris Church
5c61369574 Add data option to docs for win_ping. 2014-06-19 14:25:50 -05:00
Chris Church
edbe7a4514 Add tests for win_stat module. 2014-06-19 14:25:50 -05:00
Paul Durivage
04d94ffb8f Fix variable reference 2014-06-19 14:25:50 -05:00
Paul Durivage
af0bcb354d Ensure state is present if no value provided 2014-06-19 14:25:50 -05:00
Paul Durivage
ba4b2d04d9 Fix logic to ensure state is either present or absent 2014-06-19 14:25:49 -05:00
Paul Durivage
25766a0d58 Add prelim version of win_feature module (for installing packages, roles, features, etc) 2014-06-19 14:25:49 -05:00
Michael DeHaan
7309b2ad2a Add explanation of windows upgrade details. 2014-06-19 14:25:46 -05:00
Don Schenck
7631c005ca Added logging to UpgradeToPS3.ps1
UpgradeToPS3.ps1 failed when tested with Ansible. Added logging output
to file C:\powershell\install.log.
2014-06-19 14:25:28 -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
Paul Durivage
5de34fca22 Make non-executable 2014-06-19 14:25:28 -05:00
Paul Durivage
b22e2160cf Add win_get_url module documentation 2014-06-19 14:25:28 -05:00
Paul Durivage
17f54afa08 Add win_get_url module 2014-06-19 14:25:27 -05:00
Matt Martz
069fa71d87 Remove unneeded code, document creates param and ensure creates only affects state=present 2014-06-19 14:25:27 -05:00
Matt Martz
5d7f67569f At state for win_msi and add documentation 2014-06-19 14:25:27 -05:00