1
0
Fork 0
ansible-role-forgejo/tasks/uninstall.yml

26 lines
806 B
YAML
Raw Normal View History

2023-09-04 19:32:42 +02:00
---
- name: Check existence of Forgejo systemd service
ansible.builtin.stat:
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ forgejo_identifier }}.service"
register: forgejo_service_stat
- when: forgejo_service_stat.stat.exists | bool
block:
- name: Ensure Forgejo systemd service is stopped
ansible.builtin.service:
name: "{{ forgejo_identifier }}"
state: stopped
enabled: false
daemon_reload: true
- name: Ensure Forgejo systemd service does not exists
ansible.builtin.file:
path: "{{ devture_systemd_docker_base_systemd_path }}/{{ forgejo_identifier }}.service"
state: absent
- name: Ensure Forgejo path doesn't exist
ansible.builtin.file:
path: "{{ forgejo_base_path }}"
state: absent