network/templates/ifcfg-loopback.j2

18 lines
516 B
Plaintext
Raw Normal View History

2021-10-26 21:34:13 +00:00
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
{% for network in item.ip %}
IPADDR{{ loop.index }}={{ network.ipaddr }}
{% if network.netmask is defined %}
NETMASK{{ loop.index }}={{ network.netmask }}
{% elif network.prefix is defined %}
PREFIX{{ loop.index }}={{ network.prefix }}
{% endif %}
{% endfor %}
ONBOOT=yes
NAME=loopback