{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/20366","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/20366/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/20366/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/20366/events","html_url":"https://github.com/ansible/ansible/pull/20366","id":201399111,"number":20366,"title":"Set-StrictMode -Off to support attributes with no Value object.","user":{"login":"deekayen","id":382319,"avatar_url":"https://avatars.githubusercontent.com/u/382319?v=3","gravatar_id":"","url":"https://api.github.com/users/deekayen","html_url":"https://github.com/deekayen","followers_url":"https://api.github.com/users/deekayen/followers","following_url":"https://api.github.com/users/deekayen/following{/other_user}","gists_url":"https://api.github.com/users/deekayen/gists{/gist_id}","starred_url":"https://api.github.com/users/deekayen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deekayen/subscriptions","organizations_url":"https://api.github.com/users/deekayen/orgs","repos_url":"https://api.github.com/users/deekayen/repos","events_url":"https://api.github.com/users/deekayen/events{/privacy}","received_events_url":"https://api.github.com/users/deekayen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-17T20:39:19Z","updated_at":"2017-01-17T20:39:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/20366","html_url":"https://github.com/ansible/ansible/pull/20366","diff_url":"https://github.com/ansible/ansible/pull/20366.diff","patch_url":"https://github.com/ansible/ansible/pull/20366.patch"},"body":"##### ISSUE TYPE\n- Bugfix Pull Request\n##### COMPONENT NAME\n\nwindows/win_iis_webapppool.ps1\n##### ANSIBLE VERSION\n\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\n\n```\nansible 2.1.0.0\n  config file = /etc/ansible/ansible.cfg\n  configured module search path = Default w/o overrides\n```\n##### SUMMARY\n\nSome attempts to get the win_iis_webapppool module to be strict compliant have still not fixed an issue with setting attributes on the application pool.\n\nAfter some lengthy debugging on my Windows machine, I found that on line ~82, the `Get-ItemProperty (\"IIS:\\AppPools\\\" + $name) $newParameter.Key` doesn't always return a property with a .Value object. For most properties, the value of the returned `$newParameter` is `Microsoft.IIs.PowerShell.Framework.ConfigurationAttribute`, which has a `.Value` object.\n\nOne specific case where `Get-ItemProperty` returns merely a value with no .Value object is the managedPipelineMode attribute noted on https://github.com/ansible/ansible-modules-extras/issues/1093#issuecomment-147817712. It returns a simple string like `Integrated`.\n\nAnother I found was trying to set `processModel.identityType`, which returns `SpecificUser`.\n\nThe absence of .Value is a problem on the following line because it needs to test for the existence of a null .Value object. Merely doing the check in the if statement to `$currentParameter.Value -ne $null` itself causes a warning in strict mode. Catching the warning also seems to cause an exception.\n\nThis introduces another exception to the strict rule as have been done with other iis modules.\n\nLong list of references to link:\n\nhttps://github.com/ansible/ansible/issues/12497\nhttps://github.com/ansible/ansible/issues/12494#issuecomment-142679608\nhttps://github.com/ansible/ansible/issues/12554\nhttps://github.com/ansible/ansible-modules-extras/pull/1114\nhttps://github.com/ansible/ansible-modules-extras/issues/1093#issuecomment-147817712\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/273292645","html_url":"https://github.com/ansible/ansible/pull/20366#issuecomment-273292645","issue_url":"https://api.github.com/repos/ansible/ansible/issues/20366","id":273292645,"user":{"login":"deekayen","id":382319,"avatar_url":"https://avatars.githubusercontent.com/u/382319?v=3","gravatar_id":"","url":"https://api.github.com/users/deekayen","html_url":"https://github.com/deekayen","followers_url":"https://api.github.com/users/deekayen/followers","following_url":"https://api.github.com/users/deekayen/following{/other_user}","gists_url":"https://api.github.com/users/deekayen/gists{/gist_id}","starred_url":"https://api.github.com/users/deekayen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deekayen/subscriptions","organizations_url":"https://api.github.com/users/deekayen/orgs","repos_url":"https://api.github.com/users/deekayen/repos","events_url":"https://api.github.com/users/deekayen/events{/privacy}","received_events_url":"https://api.github.com/users/deekayen/received_events","type":"User","site_admin":false},"created_at":"2017-01-17T20:39:19Z","updated_at":"2017-01-17T20:39:19Z","body":"Migrated from https://github.com/ansible/ansible-modules-extras/pull/2578"}}
{"actor":{"display_login":"deekayen"}}