How to override cookbook attribute in a machine resource? yes I tried attribute field


#1

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”]


#2

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 medya.gh@gmail.com 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”]