From 93bb6b8eafa054bf09bfd9d22689db069f59bcb5 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Sat, 28 Jan 2017 00:24:32 +0100 Subject: [PATCH] win_uri: module cleanup and added check-mode support (#20511) The following changes have been made: - Added check-mode support - Added parameter type support - Replace PSObject by a normal dictionary - Improve idempotency (only when $dest is provided it is not idempotent (yet) --- lib/ansible/modules/windows/win_uri.ps1 | 81 ++++++++++++++----------- lib/ansible/modules/windows/win_uri.py | 16 ++--- 2 files changed, 52 insertions(+), 45 deletions(-) diff --git a/lib/ansible/modules/windows/win_uri.ps1 b/lib/ansible/modules/windows/win_uri.ps1 index 5b151b105fa..a1e14b93aec 100644 --- a/lib/ansible/modules/windows/win_uri.ps1 +++ b/lib/ansible/modules/windows/win_uri.ps1 @@ -19,43 +19,44 @@ # WANT_JSON # POWERSHELL_COMMON -$params = Parse-Args $args; - -$result = New-Object psobject @{ - win_uri = New-Object psobject -} +$ErrorActionPreference = "Stop" # Functions ############################################### Function ConvertTo-SnakeCase($input_string) { $snake_case = $input_string -csplit "(?