summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed AbdelHalim <[email protected]>2025-09-14 02:05:30 +0200
committerAhmed AbdelHalim <[email protected]>2025-09-14 02:11:03 +0200
commit0095b3019a7abc95f0c195a2d5145995bec6f93c (patch)
treec3870ebee5238457c077f9c6368d76006b38c867
parent9bd3d615963404c0ca0c89c58b554203cacb4535 (diff)
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.
-rw-r--r--roles/wg_portal/tasks/main.yml2
-rw-r--r--roles/wireguard/tasks/main.yml2
2 files changed, 4 insertions, 0 deletions
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