diff --git a/CHANGELOG.md b/CHANGELOG.md index b152acf5..7f3ccdc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ SPDX-License-Identifier: GPL-3.0-or-later # Changelog +Feature: + +- Introduce `wireguard_conf_backup` to keep track of configuration changes. Default to "false" + ## 15.0.0 Breaking: diff --git a/README.md b/README.md index a2e6894a..c23d39b2 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,9 @@ wireguard_conf_group: "{{ 'root' if not ansible_os_family == 'Darwin' else 'whee # The default mode of the wg.conf file wireguard_conf_mode: 0600 +# Whether any change to the wg.conf file should be backup +wireguard_conf_backup: false + # The default state of the wireguard service wireguard_service_enabled: "yes" wireguard_service_state: "started" diff --git a/defaults/main.yml b/defaults/main.yml index 19988fd2..f9fad79d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -24,6 +24,9 @@ wireguard_conf_group: "{{ 'root' if not ansible_os_family == 'Darwin' else 'whee # The default mode of the wg.conf file wireguard_conf_mode: 0600 +# Whether any change to the wg.conf file should be backup +wireguard_conf_backup: false + # The default state of the wireguard service wireguard_service_enabled: "yes" wireguard_service_state: "started" diff --git a/tasks/main.yml b/tasks/main.yml index fe415fd9..1c3ac2d4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -162,6 +162,7 @@ owner: "{{ wireguard_conf_owner }}" group: "{{ wireguard_conf_group }}" mode: "{{ wireguard_conf_mode }}" + backup: "{{ wireguard_conf_backup }}" no_log: '{{ ansible_verbosity < 3 }}' tags: - wg-config