Thanks for looking into this, I found that the workaround in ticket http://tickets.opscode.com/browse/CHEF-4277#comment-36700 didn’t quite work but simply using single quotes did the trick to make roles work:
chef-solo -c solo.rb -o ‘role[webServer]’
From: Daniel DeLeo [mailto:firstname.lastname@example.org] On Behalf Of Daniel DeLeo
Sent: 14 June 2013 16:40
Subject: [chef] Re: RE: Re: Chef-solo override-runlist
On Thursday, June 6, 2013 at 8:28 AM, Daniel DeLeo wrote:
On Thursday, June 6, 2013 at 1:05 AM, Gibbons, Daniel (RBI-UK) wrote:
I get the same result with version 11.4.4:
For some reason the –o parameter doesn’t work correctly.
C:\Projects\Dev Ops\Chef>chef-solo -c solo.rb -o “role[base]” -ldebug
Starting Chef Client, version 11.4.4←[0m
[2013-06-06T07:42:04+01:00] INFO: *** Chef 11.4.4 ***
[2013-06-06T07:43:06+01:00] DEBUG: Building node object for localhost
[2013-06-06T07:43:06+01:00] DEBUG: Extracting run list from JSON attributes provided on command line
[2013-06-06T07:43:06+01:00] DEBUG: Applying attributes from json file
[2013-06-06T07:43:06+01:00] DEBUG: Platform is windows version 6.1.7601
[2013-06-06T07:43:06+01:00] WARN: Run List override has been provided.
[2013-06-06T07:43:06+01:00] WARN: Original Run List: 
[2013-06-06T07:43:06+01:00] WARN: Overridden Run List: [recipe[roles]]
[2013-06-06T07:43:06+01:00] INFO: Run List is [recipe[roles]]
[2013-06-06T07:43:06+01:00] INFO: Run List expands to [roles]
[2013-06-06T07:43:06+01:00] INFO: Starting Chef Run for QHSW21813.b2b.regn.nethttp://QHSW21813.b2b.regn.net
[2013-06-06T07:43:06+01:00] INFO: Running start handlers
[2013-06-06T07:43:06+01:00] INFO: Start handlers complete.
[2013-06-06T07:43:06+01:00] DEBUG: Checking for administrator privileges…
[2013-06-06T07:43:06+01:00] DEBUG: chef-client has administrator privileges on node QHSW21813.b2b.regn.nethttp://QHSW21813.b2b.regn.net.
[2013-06-06T07:43:06+01:00] DEBUG: No chefignore file found at C:/Projects/Dev Ops/Chef/cookbooks/chefignore no files wi
ll be ignored
[2013-06-06T07:43:06+01:00] DEBUG: Re-raising exception: Chef::Exceptions::CookbookNotFound - Cookbook roles not found.
If you’re loading roles from another cookbook, make sure you configure the dependency in your metadata
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/cookbook/cookbook_collection.rb:38:in `block in i
Is this a bug?
I see you’re on Windows, so I think it’s somehow windows related. But definitely a bug. You should file a bug report on tickets.opscode.comhttp://tickets.opscode.com
My colleagues did some investigation and it appears to somehow be related to mingw: http://tickets.opscode.com/browse/CHEF-4277
They found that doubling up on quotes seems to work around the issue: chef-solo -o ‘“role[foo]”’
And thanks for filing the bug report, by the way.
===================== DISCLAIMER ======================
This message is intended only for the use of the person(s)
(“Intended Recipient”) to whom it is addressed. It may contain
information which is privileged and confidential. Accordingly
any dissemination, distribution, copying or other use of this
message or any of its content by any person other than the Intended
Recipient may constitute a breach of civil or criminal law and is
strictly prohibited. If you are not the Intended Recipient, please
contact the sender as soon as possible.
Reed Business Information Limited.
Registered Office: Quadrant House, The Quadrant, Sutton, Surrey, SM2 5AS, UK.
Registered in England under Company No. 151537