--- - name: "[OpenRC] Disable and stop service: oeffi-web" service: name: "oeffi-web{{item}}" enabled: no state: stopped loop: - 1 - 2 - 3 - 4 when: - ansible_service_mgr == "openrc" - name: "[Alpine] Remove package: oeffi-web" apk: name: oeffi-web state: absent when: - ansible_distribution == "Alpine" - name: "Delete files: /etc/init.d/oeffi-webX" file: path: "/etc/init.d/oeffi-web{{ item }}" state: absent loop: - 1 - 2 - 3 - 4 when: - ansible_distribution == "Alpine" - name: "Delete directory: /var/log/oeffi-web" file: path: /var/log/oeffi-web state: absent when: - ansible_distribution == "Alpine" - name: "Delete nginx vhost for: oeffi-web" file: path: /etc/nginx/conf.d/oeffi-web.conf state: absent notify: "Restart nginx"