--- - name: "[OpenRC] Disable and stop service: maddy" service: name: "maddy" enabled: yes state: stopped when: - ansible_service_mgr == "openrc" - name: "Remove package: maddy" apk: name: maddy state: absent when: - ansible_distribution == "Alpine" - name: "Delete leftovers" file: path: "{{ item }}" state: absent with_items: - "/etc/init.d/maddy" - "/etc/maddy" - "/var/log/maddy.log" - name: "[nftables] Delete rule for: maddy" file: path: /etc/nftables.d/maddy.nft state: absent notify: "Restart nftables"