diff options
author | nitzmahone <mdavis@ansible.com> | 2015-12-03 18:57:14 -0800 |
---|---|---|
committer | nitzmahone <mdavis@ansible.com> | 2015-12-03 18:57:14 -0800 |
commit | 444f8c81aa0529adb78be31bb644ff87efe97e74 (patch) | |
tree | 50656533fe22abb03421fa4c10cb5e1ef4dec8aa | |
parent | 48b3de1243f1c6b95d31c732a7dbf8077cccfe19 (diff) | |
download | ansible-modules-extras-444f8c81aa0529adb78be31bb644ff87efe97e74.tar.gz |
temporarily disable StrictMode in modules it breaks
-rw-r--r-- | windows/win_acl.ps1 | 23 | ||||
-rw-r--r-- | windows/win_environment.ps1 | 6 | ||||
-rw-r--r-- | windows/win_iis_webbinding.ps1 | 7 | ||||
-rw-r--r-- | windows/win_scheduled_task.ps1 | 8 | ||||
-rw-r--r-- | windows/win_unzip.ps1 | 5 | ||||
-rw-r--r-- | windows/win_webpicmd.ps1 | 3 |
6 files changed, 44 insertions, 8 deletions
diff --git a/windows/win_acl.ps1 b/windows/win_acl.ps1 index b08fb03e..495788c6 100644 --- a/windows/win_acl.ps1 +++ b/windows/win_acl.ps1 @@ -18,9 +18,11 @@ # WANT_JSON # POWERSHELL_COMMON - + # win_acl module (File/Resources Permission Additions/Removal) - + +# temporary fix to keep this module working in 2.0. Needs parameter validation fixes to work in future versions +Set-StrictMode -Off #Functions Function UserSearch @@ -87,7 +89,8 @@ $result = New-Object psobject @{ win_acl = New-Object psobject changed = $false } - + +# TODO: StrictMode fix If ($params.path) { $path = $params.path.toString() @@ -98,7 +101,8 @@ If ($params.path) { Else { Fail-Json $result "missing required argument: path" } - + +# TODO: StrictMode fix If ($params.user) { $user = UserSearch -AccountName ($Params.User) @@ -121,7 +125,8 @@ ElseIf ($params.type -eq "deny") { Else { Fail-Json $result "missing required argument: type. specify whether to allow or deny the specified rights." } - + +# TODO: StrictMode fix If ($params.inherit) { # If it's a file then no flags can be set or an exception will be thrown If (Test-Path -Path $path -PathType Leaf) { @@ -140,21 +145,23 @@ Else { $inherit = "ContainerInherit, ObjectInherit" } } - + +# TODO: StrictMode fix If ($params.propagation) { $propagation = $params.propagation.toString() } Else { $propagation = "None" } - + +# TODO: StrictMode fix If ($params.rights) { $rights = $params.rights.toString() } Else { Fail-Json $result "missing required argument: rights" } - + If ($params.state -eq "absent") { $state = "remove" } diff --git a/windows/win_environment.ps1 b/windows/win_environment.ps1 index 1398524c..9dcfed83 100644 --- a/windows/win_environment.ps1 +++ b/windows/win_environment.ps1 @@ -19,10 +19,14 @@ # WANT_JSON # POWERSHELL_COMMON +# temporary fix to keep this module working in 2.0. Needs parameter validation fixes to work in future versions +Set-StrictMode -Off + $params = Parse-Args $args; $result = New-Object PSObject; Set-Attr $result "changed" $false; +# TODO: StrictMode fix If ($params.state) { $state = $params.state.ToString().ToLower() If (($state -ne 'present') -and ($state -ne 'absent') ) { @@ -32,6 +36,7 @@ If ($params.state) { $state = 'present' } +# TODO: StrictMode fix If ($params.name) { $name = $params.name @@ -41,6 +46,7 @@ If ($params.name) $value = $params.value +# TODO: StrictMode fix If ($params.level) { $level = $params.level.ToString().ToLower() If (( $level -ne 'machine') -and ( $level -ne 'user' ) -and ( $level -ne 'process')) { diff --git a/windows/win_iis_webbinding.ps1 b/windows/win_iis_webbinding.ps1 index bdff43fc..8fd56747 100644 --- a/windows/win_iis_webbinding.ps1 +++ b/windows/win_iis_webbinding.ps1 @@ -21,6 +21,9 @@ # WANT_JSON # POWERSHELL_COMMON +# temporary fix to keep this module working in 2.0. Needs parameter validation fixes to work in future versions +Set-StrictMode -Off + $params = Parse-Args $args; # Name parameter @@ -40,18 +43,22 @@ $binding_parameters = New-Object psobject @{ Name = $name }; +# TODO: StrictMode fix If ($params.host_header) { $binding_parameters.HostHeader = $params.host_header } +# TODO: StrictMode fix If ($params.protocol) { $binding_parameters.Protocol = $params.protocol } +# TODO: StrictMode fix If ($params.port) { $binding_parameters.Port = $params.port } +# TODO: StrictMode fix If ($params.ip) { $binding_parameters.IPAddress = $params.ip } diff --git a/windows/win_scheduled_task.ps1 b/windows/win_scheduled_task.ps1 index b63bd130..13c9dc37 100644 --- a/windows/win_scheduled_task.ps1 +++ b/windows/win_scheduled_task.ps1 @@ -22,6 +22,9 @@ $ErrorActionPreference = "Stop" # WANT_JSON # POWERSHELL_COMMON +# temporary fix to keep this module working in 2.0. Needs parameter validation fixes to work in future versions +Set-StrictMode -Off + $params = Parse-Args $args; $result = New-Object PSObject; Set-Attr $result "changed" $false; @@ -40,6 +43,7 @@ if($state -eq "present") { $time = Get-Attr -obj $params -name time -failifempty $true -resultobj $result $user = Get-Attr -obj $params -name user -failifempty $true -resultobj $result } +# TODO: StrictMode fix if ($params.days_of_week) { $days_of_week = $params.days_of_week @@ -49,6 +53,7 @@ elseif ($frequency -eq "weekly") Fail-Json $result "missing required argument: days_of_week" } +# TODO: StrictMode fix # Vars with defaults if ($params.enabled) { @@ -58,6 +63,7 @@ else { $enabled = $true #default } +# TODO: StrictMode fix if ($params.description) { $description = $params.description @@ -66,6 +72,7 @@ else { $description = " " #default } +# TODO: StrictMode fix if ($params.path) { $path = "\{0}\" -f $params.path @@ -76,6 +83,7 @@ else } # Optional vars +# TODO: StrictMode fix if ($params.argument) { $argument = $params.argument diff --git a/windows/win_unzip.ps1 b/windows/win_unzip.ps1 index a62f246f..2a38d153 100644 --- a/windows/win_unzip.ps1 +++ b/windows/win_unzip.ps1 @@ -19,6 +19,9 @@ # WANT_JSON # POWERSHELL_COMMON +# temporary fix to keep this module working in 2.0. Needs parameter validation fixes to work in future versions +Set-StrictMode -Off + $params = Parse-Args $args; $result = New-Object psobject @{ @@ -26,6 +29,7 @@ $result = New-Object psobject @{ changed = $false } +# TODO: StrictMode fix If ($params.creates) { If (Test-Path $params.creates) { Exit-Json $result "The 'creates' file or directory already exists." @@ -33,6 +37,7 @@ If ($params.creates) { } +# TODO: StrictMode fix If ($params.src) { $src = $params.src.toString() diff --git a/windows/win_webpicmd.ps1 b/windows/win_webpicmd.ps1 index 377edcdc..d195fa13 100644 --- a/windows/win_webpicmd.ps1 +++ b/windows/win_webpicmd.ps1 @@ -21,6 +21,9 @@ $ErrorActionPreference = "Stop" # WANT_JSON # POWERSHELL_COMMON +# temporary fix to keep this module working in 2.0. Needs parameter validation fixes to work in future versions +Set-StrictMode -Off + $params = Parse-Args $args; $result = New-Object PSObject; Set-Attr $result "changed" $false; |