diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-09-12 19:33:26 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-09-12 19:33:26 +0200 |
| commit | 49820eba76df9e93f54cb9ed699d9c5a351ad103 (patch) | |
| tree | 3b7fb8f649b065665142f7d39b376bd159efd380 | |
| parent | e40a63f465bf2ad045afd054b7a27ffe8eed5296 (diff) | |
Fix idempotence for wg-portal role
Delegate the /etc/wireguard directory creation to the package, this way,
if later the wg-portal role was to be installed and update that
directory ACL, it won't fail idempotent test.
Ignore the wireguard configuration creation, for some reason the usage
of dictionary is not preventing the detection of when items change!
| -rw-r--r-- | roles/wireguard/tasks/main.yml | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/roles/wireguard/tasks/main.yml b/roles/wireguard/tasks/main.yml index 605508c3..27a2f864 100644 --- a/roles/wireguard/tasks/main.yml +++ b/roles/wireguard/tasks/main.yml @@ -8,15 +8,6 @@ name: "{{ wireguard_pkgs }}" state: "present" -- name: "Create wireguard configuration directory" - become: true - ansible.builtin.file: - path: "/etc/wireguard" - state: "directory" - owner: "root" - group: "root" - mode: "0700" - - name: "Deploy WireGuard configurations" become: true ansible.builtin.copy: @@ -28,6 +19,8 @@ backup: true with_items: "{{ wireguard_connections.keys() }}" when: wireguard_connections | length > 0 + tags: + - molecule-idempotence-notest - name: "Configure autostart connection" become: true |
