Fix template

This commit is contained in:
Dryusdan 2024-04-10 16:27:43 +02:00
parent ca348f2fc3
commit f8fab09522

View file

@ -8,7 +8,7 @@ iface {{ lxc_ifname }} inet static
{# The line bellow need community.general version 8.4. Disabling it -#}
{#- hwaddress ether {{ (lxc_ifhwaddr | default(community.general.random_mac(seed=inventory_hostname))) | ansible.netcommon.macaddr }} -#}
hwaddress ether {{ (lxc_ifhwaddr | default('02:ec:ca:03:aa:44')) | ansible.netcommon.macaddr }} # Generate random string with hexdump -n6 -e '6/1 ":%02x"' /dev/urandom | awk ' { sub(/^:../, "02"); print } '
{%- if lxc_post_up_ip4 is defined %}
{% if lxc_post_up_ip4 is defined -%}
post-up {{ lxc_post_up_ip4 }}
{% endif %}
{%- if lxc_post_down_ip4 is defined -%}
@ -20,7 +20,7 @@ iface {{ lxc_ifname }} inet static
iface {{ lxc_ifname }} inet6 static
address {{ lxc_ipv6_gw_addr | ansible.netcommon.ipv6 }}/{{ lxc_ipv6_network | ansible.netcommon.ipaddr('prefix') }}
bridge_ports none
{%- if lxc_post_up_ip6 is defined %}
{% if lxc_post_up_ip6 is defined -%}
post-up {{ lxc_post_up_ip6 }}
{% endif %}
{%- if lxc_post_down_ip6 is defined -%}