{"action":"created","comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments/57419729","id":57419729,"diff_hunk":"@@ -124,7 +129,12 @@ try {\n }\n \n # Result\n-$directory = Get-WebVirtualDirectory -Site $site -Name $name\n+$directory = if($application) {\n+  Get-WebVirtualDirectory -Site $site -Name $name -Application $application\n+} else {\n+  Get-WebVirtualDirectory -Site $site -Name $name\n+}\n+","path":"windows/win_iis_virtualdirectory.ps1","position":24,"original_position":24,"commit_id":"1ffe5cb0147289bab18d1fbacc4e5f5a29afccd5","original_commit_id":"1ffe5cb0147289bab18d1fbacc4e5f5a29afccd5","user":{"login":"nitzmahone","id":6775756,"avatar_url":"https://avatars.githubusercontent.com/u/6775756?v=3","gravatar_id":"","url":"https://api.github.com/users/nitzmahone","html_url":"https://github.com/nitzmahone","followers_url":"https://api.github.com/users/nitzmahone/followers","following_url":"https://api.github.com/users/nitzmahone/following{/other_user}","gists_url":"https://api.github.com/users/nitzmahone/gists{/gist_id}","starred_url":"https://api.github.com/users/nitzmahone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitzmahone/subscriptions","organizations_url":"https://api.github.com/users/nitzmahone/orgs","repos_url":"https://api.github.com/users/nitzmahone/repos","events_url":"https://api.github.com/users/nitzmahone/events{/privacy}","received_events_url":"https://api.github.com/users/nitzmahone/received_events","type":"User","site_admin":false},"body":"Same thing here- use arg splatting to avoid repeating the command twice.","created_at":"2016-03-25T05:07:25Z","updated_at":"2016-03-25T05:07:25Z","html_url":"https://github.com/ansible/ansible-modules-extras/pull/1354#discussion_r57419729","pull_request_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1354","_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments/57419729"},"html":{"href":"https://github.com/ansible/ansible-modules-extras/pull/1354#discussion_r57419729"},"pull_request":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1354"}}},"pull_request":{"url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1354","id":53203050,"html_url":"https://github.com/ansible/ansible-modules-extras/pull/1354","diff_url":"https://github.com/ansible/ansible-modules-extras/pull/1354.diff","patch_url":"https://github.com/ansible/ansible-modules-extras/pull/1354.patch","issue_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1354","number":1354,"state":"open","locked":false,"title":"Fix unchecked \"application\" attribute on Get-WebVirtualDirectory.","user":{"login":"mather","id":611276,"avatar_url":"https://avatars.githubusercontent.com/u/611276?v=3","gravatar_id":"","url":"https://api.github.com/users/mather","html_url":"https://github.com/mather","followers_url":"https://api.github.com/users/mather/followers","following_url":"https://api.github.com/users/mather/following{/other_user}","gists_url":"https://api.github.com/users/mather/gists{/gist_id}","starred_url":"https://api.github.com/users/mather/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mather/subscriptions","organizations_url":"https://api.github.com/users/mather/orgs","repos_url":"https://api.github.com/users/mather/repos","events_url":"https://api.github.com/users/mather/events{/privacy}","received_events_url":"https://api.github.com/users/mather/received_events","type":"User","site_admin":false},"body":"It always raise error if I specify \"application\" attribute, because \"application\" parameter is not passed on \"Get-WebVirtualDirectory\" function.","created_at":"2015-12-10T01:12:39Z","updated_at":"2016-03-25T05:07:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"551f7764441c36782e2adb03dd37ea29f12a8434","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1354/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1354/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1354/comments","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/1ffe5cb0147289bab18d1fbacc4e5f5a29afccd5","head":{"label":"mather:fix_win_iis_virtualdirectory","ref":"fix_win_iis_virtualdirectory","sha":"1ffe5cb0147289bab18d1fbacc4e5f5a29afccd5","user":{"login":"mather","id":611276,"avatar_url":"https://avatars.githubusercontent.com/u/611276?v=3","gravatar_id":"","url":"https://api.github.com/users/mather","html_url":"https://github.com/mather","followers_url":"https://api.github.com/users/mather/followers","following_url":"https://api.github.com/users/mather/following{/other_user}","gists_url":"https://api.github.com/users/mather/gists{/gist_id}","starred_url":"https://api.github.com/users/mather/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mather/subscriptions","organizations_url":"https://api.github.com/users/mather/orgs","repos_url":"https://api.github.com/users/mather/repos","events_url":"https://api.github.com/users/mather/events{/privacy}","received_events_url":"https://api.github.com/users/mather/received_events","type":"User","site_admin":false},"repo":{"id":47728693,"name":"ansible-modules-extras","full_name":"mather/ansible-modules-extras","owner":{"login":"mather","id":611276,"avatar_url":"https://avatars.githubusercontent.com/u/611276?v=3","gravatar_id":"","url":"https://api.github.com/users/mather","html_url":"https://github.com/mather","followers_url":"https://api.github.com/users/mather/followers","following_url":"https://api.github.com/users/mather/following{/other_user}","gists_url":"https://api.github.com/users/mather/gists{/gist_id}","starred_url":"https://api.github.com/users/mather/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mather/subscriptions","organizations_url":"https://api.github.com/users/mather/orgs","repos_url":"https://api.github.com/users/mather/repos","events_url":"https://api.github.com/users/mather/events{/privacy}","received_events_url":"https://api.github.com/users/mather/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mather/ansible-modules-extras","description":"Ansible extra modules - these modules ship with ansible","fork":true,"url":"https://api.github.com/repos/mather/ansible-modules-extras","forks_url":"https://api.github.com/repos/mather/ansible-modules-extras/forks","keys_url":"https://api.github.com/repos/mather/ansible-modules-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mather/ansible-modules-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mather/ansible-modules-extras/teams","hooks_url":"https://api.github.com/repos/mather/ansible-modules-extras/hooks","issue_events_url":"https://api.github.com/repos/mather/ansible-modules-extras/issues/events{/number}","events_url":"https://api.github.com/repos/mather/ansible-modules-extras/events","assignees_url":"https://api.github.com/repos/mather/ansible-modules-extras/assignees{/user}","branches_url":"https://api.github.com/repos/mather/ansible-modules-extras/branches{/branch}","tags_url":"https://api.github.com/repos/mather/ansible-modules-extras/tags","blobs_url":"https://api.github.com/repos/mather/ansible-modules-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mather/ansible-modules-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mather/ansible-modules-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/mather/ansible-modules-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mather/ansible-modules-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/mather/ansible-modules-extras/languages","stargazers_url":"https://api.github.com/repos/mather/ansible-modules-extras/stargazers","contributors_url":"https://api.github.com/repos/mather/ansible-modules-extras/contributors","subscribers_url":"https://api.github.com/repos/mather/ansible-modules-extras/subscribers","subscription_url":"https://api.github.com/repos/mather/ansible-modules-extras/subscription","commits_url":"https://api.github.com/repos/mather/ansible-modules-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/mather/ansible-modules-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/mather/ansible-modules-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/mather/ansible-modules-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/mather/ansible-modules-extras/contents/{+path}","compare_url":"https://api.github.com/repos/mather/ansible-modules-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mather/ansible-modules-extras/merges","archive_url":"https://api.github.com/repos/mather/ansible-modules-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mather/ansible-modules-extras/downloads","issues_url":"https://api.github.com/repos/mather/ansible-modules-extras/issues{/number}","pulls_url":"https://api.github.com/repos/mather/ansible-modules-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/mather/ansible-modules-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/mather/ansible-modules-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mather/ansible-modules-extras/labels{/name}","releases_url":"https://api.github.com/repos/mather/ansible-modules-extras/releases{/id}","deployments_url":"https://api.github.com/repos/mather/ansible-modules-extras/deployments","created_at":"2015-12-10T00:55:44Z","updated_at":"2015-12-10T00:55:46Z","pushed_at":"2015-12-10T01:04:56Z","git_url":"git://github.com/mather/ansible-modules-extras.git","ssh_url":"git@github.com:mather/ansible-modules-extras.git","clone_url":"https://github.com/mather/ansible-modules-extras.git","svn_url":"https://github.com/mather/ansible-modules-extras","homepage":"","size":7967,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"51813e003331c3341b07c5cda33346cada537a3b","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":24474138,"name":"ansible-modules-extras","full_name":"ansible/ansible-modules-extras","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars.githubusercontent.com/u/1507452?v=3","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible-modules-extras","description":"Ansible extra modules - these modules ship with ansible","fork":false,"url":"https://api.github.com/repos/ansible/ansible-modules-extras","forks_url":"https://api.github.com/repos/ansible/ansible-modules-extras/forks","keys_url":"https://api.github.com/repos/ansible/ansible-modules-extras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible-modules-extras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible-modules-extras/teams","hooks_url":"https://api.github.com/repos/ansible/ansible-modules-extras/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible-modules-extras/events","assignees_url":"https://api.github.com/repos/ansible/ansible-modules-extras/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible-modules-extras/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible-modules-extras/tags","blobs_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible-modules-extras/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible-modules-extras/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible-modules-extras/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible-modules-extras/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible-modules-extras/subscription","commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible-modules-extras/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible-modules-extras/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible-modules-extras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible-modules-extras/merges","archive_url":"https://api.github.com/repos/ansible/ansible-modules-extras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible-modules-extras/downloads","issues_url":"https://api.github.com/repos/ansible/ansible-modules-extras/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible-modules-extras/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible-modules-extras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible-modules-extras/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible-modules-extras/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible-modules-extras/deployments","created_at":"2014-09-25T20:28:42Z","updated_at":"2016-03-25T05:00:56Z","pushed_at":"2016-03-25T02:48:51Z","git_url":"git://github.com/ansible/ansible-modules-extras.git","ssh_url":"git@github.com:ansible/ansible-modules-extras.git","clone_url":"https://github.com/ansible/ansible-modules-extras.git","svn_url":"https://github.com/ansible/ansible-modules-extras","homepage":"","size":12898,"stargazers_count":528,"watchers_count":528,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1072,"mirror_url":null,"open_issues_count":523,"forks":1072,"open_issues":523,"watchers":528,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1354"},"html":{"href":"https://github.com/ansible/ansible-modules-extras/pull/1354"},"issue":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1354"},"comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/issues/1354/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1354/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/pulls/1354/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible-modules-extras/statuses/1ffe5cb0147289bab18d1fbacc4e5f5a29afccd5"}}}}