michaelrigart / ansible-role-interfaces

An ansible role for configuring different network interfaces
GNU General Public License v3.0
83 stars 61 forks source link

Debian bad templates bridge_Debian.j2 : missing trailing newline #84

Closed roumano closed 1 year ago

roumano commented 3 years ago

If i use the role on a Debian 10 with this data :

    interfaces_bridge_interfaces:
     -  device: br15
        type: bridge
        address: 172.26.15.99
        netmask: 255.255.255.0
        bootproto: static
        stp: "off"
        mtu: 1500
        ports: [eno1]

The debug output will be :

TASK [interfaces : Create the network configuration file for bridge devices] *******************************************************************************
changed: [XXX] => (item={'device': 'br15', 'type': 'bridge', 'address': '172.26.15.99', 'netmask': '255.255.255.0', 'bootproto': 'static', 'stp': 'off', 'mtu': 1500, 'ports': ['eno1']})

                "item": {
                    "address": "172.26.15.99",
                    "bootproto": "static",
                    "device": "br15",
                    "mtu": 1500,
                    "netmask": "255.255.255.0",
                    "ports": [
                        "eno1"
                    ],
                    "stp": "off",
                    "type": "bridge"

And the destination file will look like this :

auto br15
iface br15 inet static
mtu 1500
address 172.26.15.99
netmask 255.255.255.0
bridge_ports eno1bridge_stp off