[chef] Re: Dynamic template path.

Chronological Thread 
  • From: "Eric G. Wolfe" < >
  • To:
  • Cc:
  • Subject: [chef] Re: Dynamic template path.
  • Date: Tue, 22 May 2012 14:38:59 -0400

syntax error, unexpected tIDENTIFIER, expecting ']'

From the message it looks like you have an unmatched [. Perhaps an array that isn't closed. Perhaps a node attribute missing a ' or ]. Perhaps a string with single or double quotes unclosed. Somewhere on, or before, line 46 in KVM_VMM_control_node.rb. If you need anything more than that, please pastebin the code.

Eric G. Wolfe
Senior Linux Administrator,
IT Infrastructure Systems
Marshall University Computing Services
Drinko Library 428-K
One John Marshall Dr.
Huntington, WV 25755
Phone: 304.942.3970

You will be recognized and honored as a community leader.

On 05/22/2012 02:09 PM, 

I need to create a template for network scripts, eg:

template "/etc/sysconfig/network-scripts/ifcfg-xxx" do

Where "xxx" is specified in either default or override attributes. I have

template "/etc/sysconfig/network-scripts/ifcfg-xxxi#{node['xxx']}" do
template "/etc/sysconfig/network-scripts/ifcfg-" + node['xxx'] do

path = "/etc/sysconfig/network-scripts/ifcfg-" + node['xxx']
template path do

but all give knife upload errors of the form:
syntax error, unexpected tIDENTIFIER, expecting ']'

Suggestions please.

Archive powered by MHonArc 2.6.16.