If I have two attribute files (server_type_a.rb and server_type_b.rb)
how can I ensure that recipes/default.rb only uses
attributes/server_type_a.rb and recipes/server_b.rb only uses
attributes/server_type_b.rb?
-J
If I have two attribute files (server_type_a.rb and server_type_b.rb)
how can I ensure that recipes/default.rb only uses
attributes/server_type_a.rb and recipes/server_b.rb only uses
attributes/server_type_b.rb?
-J
On May 25, 2011, at 4:56 PM, Jason J. W. Williams wrote:
If I have two attribute files (server_type_a.rb and server_type_b.rb)
how can I ensure that recipes/default.rb only uses
attributes/server_type_a.rb and recipes/server_b.rb only uses
attributes/server_type_b.rb?
If you really want this, you can check to see if the current node has a role/recipe/tag applied inside the attribute files.
A better way, though, would be to use a role for this - have a single attribute file that sets a sane default, and a role for server_type_a and server_type_b.
Best,
Adam
This is a specialized MySQL install (special binary for various reasons). Was hoping to just make it a variant of our main MySQL cookbook. Sounds like the better option is making it it's own cookbook. Since its more than just attribute customization. Thank you for your help.
-J
Sent via iPhone
Is your email Premiere?
On May 25, 2011, at 22:06, Adam Jacob adam@opscode.com wrote:
On May 25, 2011, at 4:56 PM, Jason J. W. Williams wrote:
If I have two attribute files (server_type_a.rb and server_type_b.rb)
how can I ensure that recipes/default.rb only uses
attributes/server_type_a.rb and recipes/server_b.rb only uses
attributes/server_type_b.rb?If you really want this, you can check to see if the current node has a role/recipe/tag applied inside the attribute files.
A better way, though, would be to use a role for this - have a single attribute file that sets a sane default, and a role for server_type_a and server_type_b.
Best,
Adam
is there any way to use databag item or json file value in my attribute file in .rb file iam able to read these value directly in my recipes by using syntax data_bag_item(‘test’,‘ix1csqlwin1’)[‘instance_name’] but in the same way i want to use the json file item in my attribute value and use it further
check= data_bag_item(‘test’,‘ix1csqlwin1’)[‘instance_name’]
default[‘sqlserver’][‘instance_name’] = check
if there’s any way than kindly suggest