[daisy] network template: Fix set inside loop
[pharos.git] / config / installers / daisy / network.yaml.j2
index f5ac615..f976ab7 100644 (file)
@@ -1,5 +1,5 @@
 ##############################################################################
-# Copyright (c) 2017 ZTE Corporation and others.
+# Copyright (c) 2018 ZTE Corporation and others.
 #
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Apache License, Version 2.0
@@ -72,7 +72,8 @@ networks:
       {%- set gateway = ".".join([ips[0], ips[1], ips[2], "1"]) -%}
     {%- endif -%}
 
-    {%- set networks = networks.update({key: {'interface_name': interface_name,
+    {#- set v=v.update(...) is unpredictable and breaks in older j2 -#}
+    {%- set _ = networks.update({key: {'interface_name': interface_name,
                                               'bus_addr': bus_addr,
                                               'vlan': vlan,
                                               'network': network,