From a51226cc780ed54d434dfadb2af9aa9ba0b84344 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Fri, 7 Apr 2023 09:58:00 +0200 Subject: [PATCH] Add mode definition --- templates/config.j2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/config.j2 b/templates/config.j2 index de87f2d..43d88e4 100644 --- a/templates/config.j2 +++ b/templates/config.j2 @@ -12,6 +12,11 @@ profile {{ p.profile | default('') }} { {% if s.status is defined and s.status == 'enable' %} {{- ' enable' -}} {% endif %} + {% if s.mode is defined %} + {{- ' mode ' ~ s.mode }} + {% elif current['mode'] is defined %} + {{- ' mode ' ~ current['mode'] -}} + {% endif %} {% if s.position is defined %} {{- ' position ' ~ s.position -}} {% endif %} @@ -24,8 +29,8 @@ profile {{ p.profile | default('') }} { {% endif %} {% if s.scale is defined %} {{- ' scale ' ~ s.scale -}} - {% elif current['options']['scale'] is defined %} - {{- ' scale ' ~ current['options']['scale'] -}} + {% elif current['scale'] is defined %} + {{- ' scale ' ~ current['scale'] -}} {% endif %} {% endif %}