mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
* remidate Windows debugging Using $complex_args is not working (anymore?). We need to set $params directly. * Fixing issue with win_iis_website parameter types There are two types of attributes. "String" and "Configuration Attribute". We need to get the real "value" based on the type. * Revert "remidate Windows debugging" This reverts commit df75d3bb0d152b10c24187ce4c643b4733bae336.
This commit is contained in:
parent
49739dda47
commit
7f59f7d80e
1 changed files with 9 additions and 2 deletions
|
@ -150,8 +150,15 @@ Try {
|
||||||
# Set properties
|
# Set properties
|
||||||
if($parameters) {
|
if($parameters) {
|
||||||
$parameters | foreach {
|
$parameters | foreach {
|
||||||
$parameter_value = Get-ItemProperty "IIS:\Sites\$($site.Name)" $_[0]
|
$property_value = Get-ItemProperty "IIS:\Sites\$($site.Name)" $_[0]
|
||||||
if((-not $parameter_value) -or ($parameter_value.Value -as [String]) -ne $_[1]) {
|
|
||||||
|
switch ($property_value.GetType().Name)
|
||||||
|
{
|
||||||
|
"ConfigurationAttribute" { $parameter_value = $property_value.value }
|
||||||
|
"String" { $parameter_value = $property_value }
|
||||||
|
}
|
||||||
|
|
||||||
|
if((-not $parameter_value) -or ($parameter_value) -ne $_[1]) {
|
||||||
Set-ItemProperty "IIS:\Sites\$($site.Name)" $_[0] $_[1]
|
Set-ItemProperty "IIS:\Sites\$($site.Name)" $_[0] $_[1]
|
||||||
$result.changed = $true
|
$result.changed = $true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue