Scenario : Dependent on an attribute variable I want additional text blocks to be put into a configuration file.
Using Chef Server 12 and Windows Client 12.15.19
I have found answers link but have been unable to get it to work.
Current code :
attribute
default['application']['patch'] = true
Template code:
Existing text in template
<% If node['application']['patch'] -%>
THIS IS THE TEXT BELOW I WANT TO ADD
<policyEntry queue="TESTING" producerFlowControl="true" memoryLimit="20mb">
<deadLetterStrategy>
<individualDeadLetterStrategy queuePrefix="READY." useQueueForQueueMessages="true" processExpired="true" processNonPersistent="true"/>
</deadLetterStrategy>
</policyEntry>
END OF TEXT
<% End -%>
Existing text in template
The knife upload works ok but on run I get an error about an unexpected if
Its probably a simple mistake but any help would be appreciated.