From 49820eba76df9e93f54cb9ed699d9c5a351ad103 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Fri, 12 Sep 2025 19:33:26 +0200 Subject: 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! --- roles/wireguard/tasks/main.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'roles') 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 -- cgit v1.2.3