Revision 8c140b0a
Added by Bastian Schmidt 3 months ago
app/views/unattended/provisioning_templates/snippet/preseed_netplan_setup.erb | ||
---|---|---|
:interface => bond,
|
||
:subnet => bond.subnet,
|
||
:subnet6 => bond.subnet6,
|
||
:dhcp => bond.subnet&.dhcp_boot_mode?,
|
||
:dhcp6 => bond.subnet&.dhcp_boot_mode? }) -%>
|
||
:dhcp => bond.subnet.nil? ? false : bond.subnet.dhcp_boot_mode?,
|
||
:dhcp6 => bond.subnet6.nil? ? false : bond.subnet6.dhcp_boot_mode? }) -%>
|
||
<%= result -%>
|
||
interfaces: <%= bond.attached_devices_identifiers %>
|
||
parameters:
|
||
... | ... | |
:interface => bridge,
|
||
:subnet => bridge.subnet,
|
||
:subnet6 => bridge.subnet6,
|
||
:dhcp => bridge.subnet&.dhcp_boot_mode?,
|
||
:dhcp6 => bridge.subnet6&.dhcp_boot_mode? }) -%>
|
||
:dhcp => bridge.subnet.nil? ? false : bridge.subnet.dhcp_boot_mode?,
|
||
:dhcp6 => bridge.subnet6.nil? ? false : bridge.subnet6.dhcp_boot_mode? }) -%>
|
||
<%= result -%>
|
||
<%- end -%>
|
||
<%#
|
||
... | ... | |
:interface => vlan,
|
||
:subnet => vlan.subnet,
|
||
:subnet6 => vlan.subnet6,
|
||
:dhcp => vlan.subnet&.dhcp_boot_mode?,
|
||
:dhcp6 => vlan.subnet6&.dhcp_boot_mode? }) -%>
|
||
:dhcp => vlan.subnet.nil? ? false : vlan.subnet.dhcp_boot_mode?,
|
||
:dhcp6 => vlan.subnet6.nil? ? false : vlan.subnet6.dhcp_boot_mode? }) -%>
|
||
<%= result -%>
|
||
id: <%= vlan.tag %>
|
||
link: <%= vlan.attached_to %>
|
||
... | ... | |
:interface => interface,
|
||
:subnet => interface.subnet,
|
||
:subnet6 => interface.subnet6,
|
||
:dhcp => interface.subnet.dhcp_boot_mode?,
|
||
:dhcp6 => interface.subnet6&.dhcp_boot_mode? }) -%>
|
||
:dhcp => interface.subnet.nil? ? false : interface.subnet.dhcp_boot_mode?,
|
||
:dhcp6 => interface.subnet6.nil? ? false : interface.subnet6.dhcp_boot_mode? }) -%>
|
||
<%= result -%>
|
||
<%- end -%>
|
||
<%- end -%>
|
Also available in: Unified diff
Refs #37010 - Ensure correct yaml for netplan
The introduced safe operator returns nil instead of false, but the
snippet expects true/false.