Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
iis_root errors on 'duplicate collection entry of type 'mimeMap' #199
Apologies if this isn't the right place but I've been banging my head against the wall trying to figure out why this isn't working.
I'm using chef-client 12.4.1 (in local mode with -z) and the latest version of this IIS coobook. The windows cookbook is also up to date. The OS is an AWS AMI of Windows 2008 r2.
My code is as follows:
This runs the first time, subsequent runs do not work and give the following message:
As with the iis_config resource, I have tried adding the following 'work around' to deal with error 183. As with most commands, windows tends to give too much back and causes things to fail, I added the following line to resources/root.rb:
That also didn't work. I have tried to specify the :config option, using the 'default_documents' and 'mime_types' but unfortunately I get similar errors when the mime types are either missing or present. I also have tried deleting the default list of mime_types from resources/root.rb, which now looks like:
So, can anyone help here, is there a bug for 2008 r2, I'd rather not have to hack together some powershell script and use this, unfortunately I don't know how to fix it.
@electronicalias this is exactly the place to complain about this stuff.
I'll launch a win2008r2 box and test this out with vagrant, i'll be using the provided recipe snippet. Please remember that when "working around" error codes you can just add it to the provider
iis_root 'configuredd' do add_default_documents ['index.cfm'] action :add returns [0,183] add_mime_maps [ "fileExtension='.ipx',mimeType='application/x-ipix'", "fileExtension='.sco',mimeType='application/x-sibileus-scorch'", "fileExtension='.mp4',mimeType='video/mp4v-es'", "fileExtension='.sitx',mimeType='application/x-stuffitx'", "fileExtension='.indd',mimeType='application/x-indesign'", "fileExtension='.indt',mimeType='application/octet-stream'", "fileExtension='.inx',mimeType='application/octet-stream'", "fileExtension='.dmg',mimeType='application/x-apple-diskimage'", "fileExtension='.emf',mimeType='image/x-emf'", "fileExtension='.properties',mimeType='text/plain'", "fileExtension='.xfdf',mimeType='application/vnd.adobe.xfdf'", "fileExtension='.vob',mimeType='video/dvd'", "fileExtension='.m4v',mimeType='video/x-m4v'", "fileExtension='.json',mimeType='application/json'", "fileExtension='.oft',mimeType='application/vnd.ms-outlook'", "fileExtension='.idml',mimeType='application/epub%u002bzip'", "fileExtension='.air',mimeType='application/vnd.adobe.air-application-installer-package zip'", "fileExtension='.svg',mimeType='application/svg%u002bxml'", "fileExtension='.woff',mimeType='image/eps'", "fileExtension='.ai',mimeType='image/ai'", "fileExtension='.eps',mimeType='image/eps'" ] end
Thanks and thanks for jumping on this. Not complaining, it's been a good experience so far and I'm a complete novice, both with Chef and Ruby to be honest.
If you mean adding the following:
I did, got an error message that it wasn't supported:
Just so you're aware, I've run a set of recipes to get this far, install IIS, features, folders and other software, this is one of the last steps. My structure is like this:
Let me know if you need any more information.