{"action":"closed","issue":{"url":"https://api.github.com/repos/chef-cookbooks/iis/issues/287","repository_url":"https://api.github.com/repos/chef-cookbooks/iis","labels_url":"https://api.github.com/repos/chef-cookbooks/iis/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/iis/issues/287/comments","events_url":"https://api.github.com/repos/chef-cookbooks/iis/issues/287/events","html_url":"https://github.com/chef-cookbooks/iis/issues/287","id":166086241,"number":287,"title":"Error 50: Adding IIS Components (features) on server 2008 r2.","user":{"login":"Yvangelist01","id":18441678,"avatar_url":"https://avatars.githubusercontent.com/u/18441678?v=3","gravatar_id":"","url":"https://api.github.com/users/Yvangelist01","html_url":"https://github.com/Yvangelist01","followers_url":"https://api.github.com/users/Yvangelist01/followers","following_url":"https://api.github.com/users/Yvangelist01/following{/other_user}","gists_url":"https://api.github.com/users/Yvangelist01/gists{/gist_id}","starred_url":"https://api.github.com/users/Yvangelist01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yvangelist01/subscriptions","organizations_url":"https://api.github.com/users/Yvangelist01/orgs","repos_url":"https://api.github.com/users/Yvangelist01/repos","events_url":"https://api.github.com/users/Yvangelist01/events{/privacy}","received_events_url":"https://api.github.com/users/Yvangelist01/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-18T12:51:26Z","updated_at":"2016-07-29T03:42:15Z","closed_at":"2016-07-29T03:42:15Z","body":"### Cookbook version\r\n4.1.6\r\n\r\n### Chef-client version\r\n12.8.1\r\n\r\n### Platform Details\r\nWindows Server 2008 R2\r\n\r\n### Scenario:\r\nError 50: Adding IIS Components (features) on server 2008 r2.\r\n\r\n### Steps to Reproduce:\r\nIn your test cookbook add the following components on a server 2008 r2.\r\n```ruby\r\nnode.override['iis']['components'] = ['IIS-WebServer', 'WAS-WindowsActivationService', 'WAS-ProcessModel']\r\n```\r\n\r\nthen just\r\n\r\n```ruby\r\ninclude_recipe 'iis'\r\n```\r\n\r\n### Expected Result:\r\nShould be successful \r\n\r\n### Actual Result:\r\nI get Error 50 DISM. \r\nBasically it tries to add IIS-WebServer features from your additional components but fails because the IIS-WebServerRole is not installed.\r\n\r\nSo either changes the all attribute  in default windows_feature to support older than server 2008 r2\r\nor just change the order of the array of the feature loop to put default first then the additional components:\r\n```ruby\r\niis:default.rb\r\ndefault = Opscode::IIS::Helper.older_than_windows2008r2? ? 'Web-Server' : 'IIS-WebServerRole'\r\n\r\n\r\n(node['iis']['components'] + [default]).each do |feature|\r\n  windows_feature feature do\r\n    action :install\r\n    all !Opscode::IIS::Helper.older_than_windows2012?\r\n    source node['iis']['source'] unless node['iis']['source'].nil?\r\n  end\r\nend\r\n\r\nservice 'iis' do\r\n  service_name 'W3SVC'\r\n  action [:enable, :start]\r\nend\r\n```"}}
{"actor":{"display_login":"EasyAsABC123"}}