From 2b3c8787157fe86386657f54e9c15dfe467ccd95 Mon Sep 17 00:00:00 2001 From: Robert Wimmer <2039811+githubixx@users.noreply.github.com> Date: Thu, 17 Feb 2022 22:55:25 +0100 Subject: [PATCH] honor wireguard_save_config value (#149) * honor wireguard_save_config value * update CHANGELOG --- CHANGELOG.md | 4 ++++ templates/etc/wireguard/wg.conf.j2 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1791935..f7c84ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ SPDX-License-Identifier: GPL-3.0-or-later # Changelog +## 9.0.1 + +- FIX: The template rendering the WireGuard configuration only checked if `wireguard_save_config` was set and if so sets `SaveConfig = true`. So setting `wireguard_save_config: "false"` had no effect. + ## 9.0.0 - set minimally required Ansible version to `2.9` (contribution by @8ware) diff --git a/templates/etc/wireguard/wg.conf.j2 b/templates/etc/wireguard/wg.conf.j2 index d8c0ebe..f8929dd 100644 --- a/templates/etc/wireguard/wg.conf.j2 +++ b/templates/etc/wireguard/wg.conf.j2 @@ -42,7 +42,7 @@ PostDown = {{ wg_postdown }} {% endfor %} {% endif %} {% if wireguard_save_config is defined %} -SaveConfig = true +SaveConfig = {{ wireguard_save_config }} {% endif %} {% for host in ansible_play_hosts %} {% if host != inventory_hostname %}