From 99cd550cd9732e9b97b425d87c21bd73cefa4dcd Mon Sep 17 00:00:00 2001 From: Mathias Teier Date: Sun, 31 Jan 2021 20:53:43 +0100 Subject: [PATCH] Check if Config exists in Mautrix-Telegram playbook --- mautrix-telegram/start.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mautrix-telegram/start.yml b/mautrix-telegram/start.yml index 11b60f3..be08106 100644 --- a/mautrix-telegram/start.yml +++ b/mautrix-telegram/start.yml @@ -30,10 +30,18 @@ owner: root when: mautrixtelegram_data_dir_stat.islnk is not defined + - name: Check if config exists + fstat: + path: /var/mautrix-telegram/config.yaml + register: config_stat + + #IMPORTANT: Mautrix-Telegram modifies config on first start to include the regisration keys + #for the Matrix home serer. Therefore NEVER overwrite an existing config, but edit it manually - name: Copy config copy: src: config/config.yaml dest: /var/mautrix-telegram/config.yaml + when: config_stat.islnk is not defined - name: Copy compose file copy: