Add cleanup
This commit is contained in:
parent
6890e013ae
commit
70a4272b82
36
ansible/post-delete.yml
Normal file
36
ansible/post-delete.yml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: Load variables
|
||||||
|
include_vars:
|
||||||
|
dir: "{{ dokku_lib_root }}/data/ansible/gitea/vars/"
|
||||||
|
extensions:
|
||||||
|
- yml
|
||||||
|
|
||||||
|
- name: Remove host Gitea group
|
||||||
|
group:
|
||||||
|
name: gitea
|
||||||
|
system: true
|
||||||
|
state: absent
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Remove host Gitea user
|
||||||
|
user:
|
||||||
|
name: gitea
|
||||||
|
group: gitea
|
||||||
|
state: absent
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Remove mariadb database
|
||||||
|
shell: "dokku mariadb:destroy gitea --force"
|
||||||
|
args:
|
||||||
|
removes: /var/lib/dokku/services/mariadb/gitea
|
||||||
|
|
||||||
|
- name: Remove volume mount configuration directories
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: absent
|
||||||
|
with_items:
|
||||||
|
- /var/lib/gitea
|
||||||
|
- /var/lib/dokku/services/mariadb/gitea
|
||||||
|
become: true
|
Reference in New Issue
Block a user