Implement post-delete and add clarifying comment

This commit is contained in:
Luke Murphy 2020-04-13 16:14:07 +02:00
parent 73bfc21bac
commit 77909b5f73
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
3 changed files with 20 additions and 6 deletions

View File

@ -1,12 +1,11 @@
---
- name: Setup database facts
set_fact:
mount_map:
mariadb: /var/lib/mysql
- name: Run database setup tasks
block:
- name: Setup database facts
set_fact:
mount_map:
mariadb: /var/lib/mysql
- name: "Create {{ item.type }} database"
no_log: true
shell: "

View File

@ -1,4 +1,14 @@
---
- hosts: all
gather_facts: false
tasks: []
tasks:
- name: Remove deploy.d folder
file:
path: "{{ app_config_root }}"
state: absent
- name: Remove database(s)
shell: "dokku {{ item.type }}:destroy {{ app }} --force"
args:
removes: "/var/lib/dokku/services/{{ item.type }}/{{ app }}"
with_items: "{{ db }}"

View File

@ -16,7 +16,12 @@
- name: Include domain tasks
include: ./lib/domain.yml
# Note(decentral1se): in order to iterate through the end-user defined `db`
# stanza in the config.yml, we need to pass them into the include / block
# using `with_items` because Ansible decides that is the only way we can do
# that
- name: Include database tasks
no_log: true
include: ./lib/database.yml
with_items: "{{ db }}"
when: db is defined