Please activate JavaScript in your web browser
Chef Mailing Lists - Archives
Please visit
https://discourse.chef.io
to subscribe
Skip to Content.
List of lists
Home
Help
email address :
password :
First login ?
Lost password ?
Subscribers:
1946
Owners
Bryan McLellan
Joshua Timberman
Nathen Harvey
Seth Chisamore
Serdar Sutay
Subscribe
Unsubscribe
Info
Archive
Post
RSS
Shared documents
General discussion about Chef
[chef] Re: Re: Using Chef to install Java (my first recipe)
Chronological
Thread
<
Chronological
>
<
Thread
>
From
: phil swenson < >
To
:
Subject
: [chef] Re: Re: Using Chef to install Java (my first recipe)
Date
: Thu, 13 Mar 2014 20:06:36 -0600
On Thu, Mar 13, 2014 at 5:37 PM, Christopher Armstrong
<
" target="_blank">
>
wrote:
node
[
'java'
][
'install_flavor'
] = 'oracle'
Which file do I set “
node
[
'java'
][
'install_flavor'
] = ‘oracle’”??
this is something fundamental to chef I don’t get. I tried setting this in main/recipes/default.rb but node evaluates to nil.
thanks
phil
error:
NoMethodError
-------------
undefined method `[]' for nil:NilClass
Cookbook Trace:
---------------
/root/chef-solo/cookbooks-2/java/recipes/set_attributes_from_version.rb:22:in `from_file'
/root/chef-solo/cookbooks-2/java/recipes/default.rb:21:in `from_file'
/root/chef-solo/cookbooks-2/main/recipes/default.rb:11:in `from_file'
Relevant File Content:
----------------------
/root/chef-solo/cookbooks-2/java/recipes/set_attributes_from_version.rb:
15:
16: # Calculate variables that depend on jdk_version
17: # If you need to override this in an attribute file you must use
18: # force_default or higher precedence.
19:
20: case node['platform_family']
21: when "rhel", "fedora"
22>> case node['java']['install_flavor']
23: when "oracle"
24: node.default['java']['java_home'] = "/usr/lib/jvm/java"
25: when "oracle_rpm"
26: node.default['java']['java_home'] = "/usr/java/latest"
27: else
28: node.default['java']['java_home'] = "/usr/lib/jvm/java-1.#{node['java']['jdk_version']}.0"
29: end
30: node.default['java']['openjdk_packages'] = ["java-1.#{node['java']['jdk_version']}.0-openjdk", "java-1.#{node['java']['jdk_version']}.0-openjdk-devel"]
31: when "freebsd"
[chef] Using Chef to install Java (my first recipe)
,
phil swenson, 03/13/2014
[chef] Re: Using Chef to install Java (my first recipe)
,
Christopher Armstrong, 03/13/2014
[chef] Re: Re: Using Chef to install Java (my first recipe)
,
Jasna Benčić, 03/13/2014
[chef] Re: Re: Re: Using Chef to install Java (my first recipe)
,
phil swenson, 03/13/2014
[chef] Re: Re: Re: Re: Using Chef to install Java (my first recipe)
,
Christopher Armstrong, 03/13/2014
[chef] Re: Re: Re: Re: Re: Using Chef to install Java (my first recipe)
,
phil swenson, 03/14/2014
[chef] Re: Re: Using Chef to install Java (my first recipe)
,
phil swenson, 03/13/2014
[chef] Re: Re: Re: Using Chef to install Java (my first recipe)
,
Daniel DeLeo, 03/13/2014
Archive powered by
MHonArc 2.6.16
.
§
Powered by Sympa 5.3.4