Skip to content

Commit

Permalink
Wireguard conf backup (#201)
Browse files Browse the repository at this point in the history
* add variable wireguard_conf_backup

* CHANGELOG: variable wireguard_conf_backup

---------

Co-authored-by: shk3bq4d <[email protected]>
  • Loading branch information
shk3bq4d and shk3bq4d authored Apr 22, 2024
1 parent d1cba57 commit f281bcf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f281bcf

Please sign in to comment.