network: Add missing template
This commit is contained in:
parent
ce46c5fb90
commit
7c7b632fc8
1 changed files with 42 additions and 0 deletions
42
roles/network/templates/nmconnection.j2
Normal file
42
roles/network/templates/nmconnection.j2
Normal file
|
@ -0,0 +1,42 @@
|
|||
[connection]
|
||||
id={{ item.device }}
|
||||
{% for line in interface_uuid.stdout_lines %}
|
||||
{% if line.split()[0] == item.device %}
|
||||
uuid={{ line.split()[1] }}
|
||||
{% elif line.split()[2] == item.device %}
|
||||
uuid={{ line.split()[1] }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
type=ethernet
|
||||
interface-name={{ item.device }}
|
||||
|
||||
[ethernet]
|
||||
|
||||
[ipv4]
|
||||
{% if item.proto is not defined or item.proto == 'dhcp' %}
|
||||
method=auto
|
||||
{% elif item.proto == 'static' %}
|
||||
method=manual
|
||||
address1={{ item.ipaddr }}/{{ item.netmask }}
|
||||
{% if item.gateway is defined %}
|
||||
gateway={{ item.gateway }}
|
||||
{% endif %}
|
||||
{% elif item.proto == 'none' %}
|
||||
method=disabled
|
||||
{% endif %}
|
||||
{% if item.nameservers is defined %}
|
||||
dns={% for name in item.nameservers %}{{ name }};{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
[ipv6]
|
||||
addr-gen-mode=eui64
|
||||
{% if item.ip6addr is not defined or item.ip6addr == 'none' %}
|
||||
method=disabled
|
||||
{% elif item.ip6addr == 'auto' %}
|
||||
method=auto
|
||||
{% else %}
|
||||
method=manual
|
||||
address1={{ item.ip6addr }}
|
||||
{% endif %}
|
||||
|
||||
[proxy]
|
Loading…
Add table
Reference in a new issue