In the first part of the Chef fundamentals webinar it shows an example of template use with HAProxy. The template uses the following text:
<% @pool_members.each do |member| -%>
server <% member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check
<% end -%>
I am having difficulty understand what the :> operator does in this code. I can’t find any mention in Eruby, ERB, Chef, or Ruby documentation. Is this a typo? Does it have meaning?
That’s actually hostname then the IP address, not port. I still agree that it is a typo though, but I don’t have enough knowledge with templates to test the output. I keep getting odd errors with chef-apply.
I am going to review more Eruby documentation and see if I can sort this out further.