Smart Class Parameter type yaml and conditional

Hi all,

how can I use if clauses in YAML - Smart Class Parameter (puppet classes)?

When I use this YAML, and save the Smart Class Parameter
eth0:
ipaddress: <%= @host.ip -%>
netmask: <%= @host.subnet.mask -%>
gateway: <%= @host.subnet.gateway -%>
first:
interface: <%= @host.interfaces.first.name -%>
ipaddress: <%= @host.interfaces.first.ip -%>
netmask: <%= @host.interfaces.first.subnet.mask -%>
second:
interface: <%= @host.interfaces.second.name -%>
ipaddress: <%= @host.interfaces.second.ip -%>
netmask: <%= @host.interfaces.second.subnet.mask -%>
<% if @host.interfaces.third -%>
third:
interface: <%= @host.interfaces.third.name -%>
ipaddress: <%= @host.interfaces.third.ip -%>
netmask: <%= @host.interfaces.third.subnet.mask -%>
<% end -%>
the following Error occours
Warning!
(<unknown>): could not find expected ':' while scanning a simple key at
line 13 column 1

The definition for eth0, first and second works fine, but I will check if
the interface defined then configure it!

I use Formean 1.5.1 on CentOS 6.5

Any help is welcome,
Franz