[chef] Re: how to override cookbook attribute in a machine resource? yes I tried attribute field


Chronological Thread 
  • From: Christine Draper < >
  • To:
  • Subject: [chef] Re: how to override cookbook attribute in a machine resource? yes I tried attribute field
  • Date: Thu, 30 Apr 2015 21:05:39 -0500

Hi,

Try this...

machine "my_example_machine" do
  recipe "cccis-inbound::inbound_admin_machine"
  attribute ['cccis-dir-library', 'hostname'],  node['cccis-interfaces-inbound']['admin_servers'][0]['hostname']
  machine_options machine_options1
end

The first parameter to 'attribute' is either a single top-level name, or an array containing the path to the attribute.

Regards,
Christine

On Wed, Apr 29, 2015 at 11:26 AM, Medya < " target="_blank"> > wrote:
how can I override a cookbook attribute through Machine resource ? 

(yes I know about the attribute field in machine resource ) 
this does NOT work :

machine "my_example_machine" do
  recipe "cccis-inbound::inbound_admin_machine"
  attribute "node['cccis-dir-library']['hostname']",node['cccis-interfaces-inbound']['admin_servers'][0]['hostname']
  machine_options machine_options1
end


I know how to pass a variable for example I can pass:

      attribute "stack",1

and it will be available with node["stack"]




Archive powered by MHonArc 2.6.16.

§