From 671c9d6b0811e7d269816d1423735abb6bd205b2 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Sun, 14 Sep 2025 02:05:30 +0200 Subject: Put back the idempotent ignore test The idempotent test is only failing on the second run, the reason is, on the first run the wireguard files are created with default permissions, then the wg_portal role update the ACL. On the second run, the wireguard role recognizes the difference in the permissions, and update the files (expectedly), the default ACL then takes place and set the permissions correctly with ACLs On any successive run, the role is idempotent and doesn't update the files again. --- roles/wg_portal/tasks/main.yml | 2 ++ roles/wireguard/tasks/main.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/roles/wg_portal/tasks/main.yml b/roles/wg_portal/tasks/main.yml index 2b0eb3a7..edc04e21 100644 --- a/roles/wg_portal/tasks/main.yml +++ b/roles/wg_portal/tasks/main.yml @@ -53,6 +53,7 @@ etype: "group" permissions: "rx" recursive: true + default: true state: "present" - name: "Set ACL mask for /etc/wireguard" @@ -62,6 +63,7 @@ etype: "mask" permissions: "rx" recursive: true + default: true state: "present" - name: "Create wg-portal sudoers file" diff --git a/roles/wireguard/tasks/main.yml b/roles/wireguard/tasks/main.yml index e8680933..27a2f864 100644 --- a/roles/wireguard/tasks/main.yml +++ b/roles/wireguard/tasks/main.yml @@ -19,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