- From: DV <
>
- To:
- Subject: [chef] Version locking a cookbook in environment AND role
- Date: Thu, 27 Sep 2012 12:26:32 -0700
Hi folks,
I'm having trouble version locking a cookbook in the environment AND
role at the same time.
In my environment file I have:
cookbook "java", "= 0.0.10"
In my role I have:
run_list(
...
"
",
...
)
However, when I run chef-client, I get Net::HTTPServerException: 412
"Precondition Failed":
Generated at Thu Sep 27 12:17:15 -0700 2012
Net::HTTPServerException: 412 "Precondition Failed"
/usr/lib64/ruby/1.8/net/http.rb:2105:in `error!'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/rest.rb:266:in
`api_request'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/rest.rb:334:in
`retriable_rest_request'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/rest.rb:242:in
`api_request'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/rest.rb:141:in
`post_rest'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/client.rb:313:in
`sync_cookbooks'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/client.rb:194:in
`setup_run_context'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/client.rb:162:in
`run'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/application/client.rb:254:in
`run_application'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/application/client.rb:241:in
`loop'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/application/client.rb:241:in
`run_application'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/../lib/chef/application.rb:70:in
`run'
/usr/lib64/ruby/gems/1.8/gems/chef-10.12.0/bin/chef-client:26
/usr/bin/chef-client:19:in `load'
/usr/bin/chef-client:19
Running "knife cookbook show" returns expected results:
$ knife cookbook show java
java 0.0.11 0.0.10 0.0.9 0.0.8 0.0.7
Any suggestions as to why it fails?
--
Best regards, Dmitriy V.
- [chef] Version locking a cookbook in environment AND role, DV, 09/27/2012
Archive powered by MHonArc 2.6.16.