In a provisioning template, I would like to use the subnet in cidr notation
(For example '10.9.6.0/24' ) by using the information provided by the @interfaces array. (<%= @host.interfaces.first.subnet… %>).
For my use case (the provisioning of ESXi hypervisors) ,I could solve the
problem by defining the cidr address as a hostgroup variable, but
rendering based on the subnet information that is available in
foreman would certainly be a better solution.
···
On Thursday, February 20, 2014 3:25:27 PM UTC+1, Herwig Bogaert wrote:
>
> Hi
>
> In a provisioning template, I would like to use the subnet in cidr
> notation (For example '10.9.6.0/24' ) by using the information provided
> by the @interfaces array. (<%= @host.interfaces.first.subnet.... %>).
>
> For my use case (the provisioning of ESXi hypervisors) ,I could solve the
> problem by defining the cidr address as a hostgroup variable, but
> rendering based on the subnet information that is available in
> foreman would certainly be a better solution.
>
> Does someone have a suggestion ?
>
> Thanks in advance
>
> Herwig
>
> Hi
>
> In a provisioning template, I would like to use the subnet in cidr
> notation (For example '10.9.6.0/24' ) by using the information provided
> by the @interfaces array. (<%= @host.interfaces.first.subnet… %>).
>
> For my use case (the provisioning of ESXi hypervisors) ,I could solve the
> problem by defining the cidr address as a hostgroup variable, but
> rendering based on the subnet information that is available in
> foreman would certainly be a better solution.
>
> Does someone have a suggestion ?
>
how about
<% @host.interfaces.each do |i| %>
<%= i.subnet.cidr %>
<% end %>
···
On Thu, Feb 20, 2014 at 4:25 PM, Herwig Bogaert wrote: