From ef3297bfe5e6af84c9508bbcb40cce0664b71741 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen.haas@lakedrops.com>
Date: Thu, 4 Aug 2022 18:33:21 +0200
Subject: [PATCH] Bug fixes

---
 tasks/app.yml      | 5 +++--
 templates/app.yaml | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tasks/app.yml b/tasks/app.yml
index 3bffd99..6f6ca26 100644
--- a/tasks/app.yml
+++ b/tasks/app.yml
@@ -27,8 +27,9 @@
         owner: root
         group: root
         mode: 0600
-      notify:
-        - Init Borg App
+      # @todo at this point, docker compose project is not running yet.
+      #notify:
+      #  - Init Borg App
 
     - name: SSH Config
       copy:
diff --git a/templates/app.yaml b/templates/app.yaml
index 01f7a22..c7d76c4 100644
--- a/templates/app.yaml
+++ b/templates/app.yaml
@@ -30,6 +30,7 @@ consistency:
         - repository
         - archives
 hooks:
+{% if application_db is defined %}
     mysql_databases:
         - name: '{{ application_db }}'
           hostname: db
@@ -37,6 +38,7 @@ hooks:
           username: '{{ application_db }}'
           password: '{{ application_db }}'
           options: '--skip-comments --no-tablespaces'
+{% endif %}
     before_backup:
         - echo "`date` - Starting backup"
     after_backup:
-- 
GitLab