Problem for deploying Server with Bond sub interface

We are deploying Physical servers with two h/w NICs to load balance and attach management network to both the NICs. Other two networks also passing through management network. So we create Master bond bond0 and sub bond interfaces like bond0.valn1 and bond0.vlan2 for other networks. Below is the sample setup.

eth0 -> Physical Nic (slave) | eth1 -> Physical Nic (slave) |
ifcfg.bond0 -> master
ifcfg.bond0.vlan1 -> IP -
ifcfg.bond0.vlan2 -> IP -
ifcfg.bond0.vlan3 -> IP -

Please let me know how to use foreman templates to deploy this configuration.

Foreman and Proxy versions:
I am using foreman version 1.17

there are {kickstart,preseed}_networking_setup snippets that are responsible for the networking setup configuration. But it is mostly about what interfaces you configure for your host. I was able to configure a vlan on top of bond with the following:

Please be aware that there is a known bug that causes the interfaces being updated incorrectly in Foreman based on Puppet facts.

Hope this helps,

Thanks Ondrej,

I will test it and update.