mirror of
https://gitea.0xace.cc/ansible-galaxy/network.git
synced 2024-11-24 22:36:38 +00:00
28 lines
782 B
Plaintext
28 lines
782 B
Plaintext
|
DEVICE="{{ item.name }}"
|
||
|
USERCTL="{{ item.userctl | default('no') }}"
|
||
|
NM_CONTROLLED="{{ item.nm_controlled | default('no') }}"
|
||
|
{% if ite.bootproto is defined %}
|
||
|
BOOTPROTO="{{ item.bootproto }}"
|
||
|
{% endif %}
|
||
|
ONBOOT="{{ item.onboot | default('yes') }}"
|
||
|
{% if item.mtu is defined %}
|
||
|
MTU="{{ item.mtu }}"
|
||
|
{% endif %}
|
||
|
{% if item.slave is defined %}
|
||
|
MASTER="{{ item.master }}"
|
||
|
SLAVE="yes"
|
||
|
{% endif %}
|
||
|
{% if item.gateway is defined %}
|
||
|
GATEWAY="{{ item.gateway }}"
|
||
|
{% endif %}
|
||
|
{% for network in item.ip %}
|
||
|
{% if network.ipaddr is defined %}
|
||
|
IPADDR{{ loop.index }}="{{ network.ipaddr }}"
|
||
|
{% endif %}
|
||
|
{% if network.netmask is defined %}
|
||
|
NETMASK{{ loop.index }}="{{ network.netmask }}"
|
||
|
{% elif network.prefix is defined %}
|
||
|
PREFIX{{ loop.index }}="{{ network.prefix }}"
|
||
|
{% endif %}
|
||
|
{% endfor %}
|