ctucx.git: ansible-configs

My personal ansible roles and playbooks [deprecated in favor of nixos]

commit de51c8aa3377b80f870de32f46dab6f305d6b9ad
parent 024b16c829b969332a15c5ba42ed24e28529d268
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sun, 21 Feb 2021 16:28:51 +0100

roles/maddy: fix some stuff
1 file changed, 17 insertions(+), 24 deletions(-)
M
roles/maddy/tasks/remove.yml
|
41
+++++++++++++++++------------------------
diff --git a/roles/maddy/tasks/remove.yml b/roles/maddy/tasks/remove.yml
@@ -1,29 +1,5 @@
 ---
 
-- name: "[nftables] Delete rule for: maddy"
-  file:
-    path: /etc/nftables.d/maddy.nft
-    state: absent
-  when: 
-    - network.nftables.enable is true
-
-- name: "[OpenRC] Restart service: nftables"
-  service:
-    name: nftables
-    state: restarted
-  when:
-    - ansible_service_mgr == "openrc"
-    - network.nftables.enable is true
-
-- name: "[systemd] Restart service: nftables"
-  systemd:
-    name: nftables
-    state: restarted
-  when:
-    - ansible_service_mgr == "systemd"
-    - network.nftables.enable is true
-
-
 - name: "[OpenRC] Disable and stop service: maddy"
   service:
     name: "maddy"

@@ -49,3 +25,20 @@
     - "/etc/init.d/maddy"
     - "/etc/maddy"
     - "/var/log/maddy.log"
+    - "/etc/nftables.d/maddy.nft"
+
+- name: "[OpenRC] Restart service: nftables"
+  service:
+    name: nftables
+    state: restarted
+  when:
+    - ansible_service_mgr == "openrc"
+    - network.nftables.enable is true
+
+- name: "[systemd] Restart service: nftables"
+  systemd:
+    name: nftables
+    state: restarted
+  when:
+    - ansible_service_mgr == "systemd"
+    - network.nftables.enable is true