This commit is contained in:
2022-01-17 01:14:20 +01:00
parent 08ae4e6bff
commit 540064740c
8 changed files with 770 additions and 316 deletions

View File

@ -15,7 +15,7 @@
- name: (interfaces.yml) Ensure interfaces file is latest
template:
src: "etc/network//interfaces.j2"
src: "etc/network/interfaces.j2"
dest: /etc/network/interfaces
with_items: network_interfaces
tags:

View File

@ -31,14 +31,7 @@ iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.
address {{ config.address }}
{% endif -%}
{% endif -%}
{% set iface_keys = ['gateway', 'metric', 'pointopoint', 'mtu', 'scope'] %}
{% for key in iface_keys %}
{% if key in config and config[key] %}
{{ key }} {{ config[key] }}
{% endif %}
{% endfor -%}
{% elif config.method == "manual" %}
{% set iface_keys = ['hwaddress', 'mtu'] %}
{% set iface_keys = ['gateway', 'metric', 'pointopoint', 'media', 'mtu', 'scope'] %}
{% for key in iface_keys %}
{% if key in config and config[key] %}
{{ key }} {{ config[key] }}
@ -51,6 +44,14 @@ iface {{ config.device }} {{ config.family | default('inet', true) }} {{ config.
{{ key }} {{ config[key] }}
{% endif %}
{% endfor -%}
{% elif config.method == "ppp" %}
{% if (config.provider is defined and config.provider) %}
provider {{ config.provider }}
{% endif %}
{% elif config.method == "wvdial" %}
{% if (config.provider is defined and config.provider) %}
provider {{ config.provider }}
{% endif %}
{% elif config.method == "bootp" %}
{% set iface_keys = ['hwaddr', 'bootfile', 'server'] %}
{% for key in iface_keys %}