Commit graph

220 commits

Author SHA1 Message Date
Peter Mounce
7f2732782d Add module to install windows updates
Supports specifying which category to install all updates from.
NEEDS: `choco install PSWindowsUpdate` beforehand - does not attempt to install it (or detect it's missing, yet)
PSWindowsUpdate: http://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc#content
2014-09-30 00:27:29 +01:00
Michael DeHaan
73123b69fa Move modules into subdirectory. 2014-09-26 09:23:50 -04:00
Jon Hawkesworth
f8a5ddb9fd 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
a098882fb9 Added null check in case http connection used and no cert found. 2014-08-31 16:20:50 +01:00
Trond Hindenes
9aa6c44473 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
1b6ef9aa2e Replace Get-FileHash with MD5 code that works on PowerShell 3. 2014-08-28 01:42:22 -04:00
Michael DeHaan
71786bbdc8 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
fc26601981 win_setup improvements: Correcly outputs ansible_totalmem on computers with multiple ram chips 2014-07-22 01:38:46 +02:00
Trond Hindenes
ba507553b0 Better result handling 2014-07-10 12:00:00 +02:00
Trond Hindenes
8e16962596 improvements to win_feature 2014-07-08 18:04:12 +02:00
Chris Church
042d5b761d Return service name, display name, start mode and state from win_service module. 2014-07-02 08:12:40 -04:00
Michael DeHaan
f777471337 Merge pull request #7889 from chrishoffman/win_group
Adding win_group module
2014-06-22 11:26:27 -05:00
Chris Hoffman
da7c617ad3 Adding win_group module 2014-06-22 09:01:04 -04:00
Chris Hoffman
3a3a285d96 Fixing bug with stopped state 2014-06-21 22:01:02 -04:00
Chris Hoffman
24ad45c8e6 Better propagation of cmdlet errors 2014-06-21 21:59:53 -04:00
Chris Hoffman
0f2c5a3472 Using generic windows service for example 2014-06-21 21:58:26 -04:00
Michael DeHaan
4e153c7584 Merge pull request #7881 from cchurch/devel
Fix typo in powershell setup module.
2014-06-21 11:31:35 -05:00
Chris Hoffman
3000614930 Adding win_service module 2014-06-21 12:04:11 -04:00
Chris Church
1780cd6fda Fix typo in powershell setup module. 2014-06-21 10:27:43 -04:00
Simon Olofsson
73c4cb4c07 win_feature: Fix Description. 2014-06-20 17:14:36 +02:00
Paul Durivage
eba5e34641 Check .GetType rather than object directly 2014-06-19 16:41:24 -05:00
Paul Durivage
1fee46270c Move check down for access to 2014-06-19 16:41:05 -05:00
Paul Durivage
44fcebc5aa Rename variable 2014-06-19 16:40:35 -05:00
Paul Durivage
42834963cc Update documentation 2014-06-19 16:40:18 -05:00
Paul Durivage
ce0909035b Fix so it only deletes users that exist 2014-06-19 16:25:02 -05:00
Paul Durivage
6f87380248 Remove commented out lines 2014-06-19 16:25:02 -05:00
Paul Durivage
ac1d1b509b Fix incorrect name 2014-06-19 16:25:02 -05:00
Paul Durivage
5636f2b033 Move functions to top for correct scope 2014-06-19 16:25:02 -05:00
Paul Durivage
f8f1b7e922 Refactor of win_user module 2014-06-19 16:25:01 -05:00
Matt Martz
0ac996fbaa Add documentation for win_user module 2014-06-19 15:38:19 -05:00
Matt Martz
53497d90da Make sure the doc stubs for windows modules have proper license headers 2014-06-19 14:27:04 -05:00
Matt Martz
1f9121911c Make sure the module name is specified correctly in the win_feature docs 2014-06-19 14:27:03 -05:00
Paul Durivage
52ffcfb1ea Add documentation for win_feature module 2014-06-19 14:26:47 -05:00
Paul Durivage
8b0cc1a87b Add comments 2014-06-19 14:26:37 -05:00
Paul Durivage
ebbf356b30 Add restart functionality 2014-06-19 14:26:36 -05:00
Paul Durivage
a8dff668dd Renaming and refactoring of names, variables 2014-06-19 14:26:36 -05:00
Chris Church
d1423254d0 Update slurp/win_ping/win_stat to use Get-Attr. 2014-06-19 14:26:36 -05:00
Paul Durivage
e0f618b27a Remove unnecessary obj 2014-06-19 14:26:10 -05:00
Chris Church
2a20dfe963 Add data option to docs for win_ping. 2014-06-19 14:25:50 -05:00
Chris Church
a13b2dd3b3 Add tests for win_stat module. 2014-06-19 14:25:50 -05:00
Paul Durivage
c218a125bb Fix variable reference 2014-06-19 14:25:50 -05:00
Paul Durivage
c83e5d0890 Ensure state is present if no value provided 2014-06-19 14:25:50 -05:00
Paul Durivage
03526456fa Fix logic to ensure state is either present or absent 2014-06-19 14:25:49 -05:00
Paul Durivage
376d1cc0a4 Add prelim version of win_feature module (for installing packages, roles, features, etc) 2014-06-19 14:25:49 -05:00
Michael DeHaan
2944962915 Add explanation of windows upgrade details. 2014-06-19 14:25:46 -05:00
Don Schenck
755da95e15 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
e9c9cab3c8 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
9a52ee4753 Make non-executable 2014-06-19 14:25:28 -05:00
Paul Durivage
ec6a386967 Add win_get_url module documentation 2014-06-19 14:25:28 -05:00
Paul Durivage
9eeb4c39f7 Add win_get_url module 2014-06-19 14:25:27 -05:00
Matt Martz
3238268ea3 Remove unneeded code, document creates param and ensure creates only affects state=present 2014-06-19 14:25:27 -05:00
Matt Martz
fed9e9087e At state for win_msi and add documentation 2014-06-19 14:25:27 -05:00
Matt Martz
499031ef47 First pass at win_msi.ps1 msi installer module 2014-06-19 14:25:27 -05:00
Paul Durivage
cb129b444a Add memory and IP information to setup 2014-06-19 14:25:27 -05:00
Matt Martz
b0ef377a09 Add Exit-Json and Fail-Json powershell helper functions 2014-06-19 14:24:15 -05:00
Matt Martz
57f43ae518 Clean up how we initialize the result psobject 2014-06-19 14:24:14 -05:00
Matt Martz
70936bbf8b A couple of DOCUMENTATION fixes for win_ping and win_stat 2014-06-19 14:24:14 -05:00
Michael DeHaan
289b77d6da Update windows docs in progress. 2014-06-19 14:24:14 -05:00
Michael DeHaan
b9f8aac85e Add doc stubs 2014-06-19 14:24:14 -05:00
Michael DeHaan
10706180a7 Add a docs stub for the module. 2014-06-19 14:24:14 -05:00
Matt Martz
d30f0e384a setup.ps1 willnot support fact_path and filter to start 2014-06-19 14:24:14 -05:00
Michael DeHaan
3bba3be68b Remove stubs. 2014-06-19 14:24:14 -05:00
Matt Martz
2e3a44d835 Need to call ToString Platform to get the string 2014-06-19 14:24:14 -05:00
Michael DeHaan
bbd8228d21 Rename some modules so they can have seperate doc stubs. 2014-06-19 14:24:13 -05:00
Matt Martz
ddb7e6669e Add start for powershell setup module 2014-06-19 14:24:13 -05:00
Matt Martz
b3b52800f3 Add license header to powersell modules 2014-06-19 14:24:13 -05:00
Matt Martz
4268cb6a2d 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
Matt Martz
3b5c568b10 Use more simple check for existence of member 2014-06-19 14:24:13 -05:00
Matt Martz
fb43772429 Instantiate psobject directly 2014-06-19 14:24:12 -05:00
Chris Church
54e5289f79 Add shell_plugins to abstract shell-specific functions out of runner, add winrm connection plugin, add initial Windows modules. 2014-06-19 14:24:12 -05:00