From 0bf4a8c5d13b289ba91f5c7484af93de71c3e6e9 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Tue, 26 Sep 2017 01:29:12 +0000 Subject: [PATCH] do not fail when network_interfaces is not defined --- templates/network-interfaces.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/network-interfaces.j2 b/templates/network-interfaces.j2 index 2d9a7cb..6609391 100644 --- a/templates/network-interfaces.j2 +++ b/templates/network-interfaces.j2 @@ -5,6 +5,7 @@ auto lo iface lo inet loopback +{% if network_interfaces is defined %} {% for netname,netif in network_interfaces.iteritems() %} ### {{ netname }} ### auto {{ netif.device }} @@ -50,6 +51,7 @@ iface {{ netif.device }} inet6 {{ ipv6.method }} {% endfor %} {% endfor %} +{% endif %} # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d