From 10117271e9fd3c5ec3494d043d839d83ce07bced Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 6 May 2021 16:00:08 +0200 Subject: [PATCH] Update to 2021-05-06 16:00 --- roles/matrix_synapse/defaults/main.yml | 2 +- roles/rabbitmq_server/tasks/install.yml | 6 ++++++ roles/rabbitmq_server/templates/post-backup.j2 | 3 +++ roles/rabbitmq_server/templates/pre-backup.j2 | 5 +++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 roles/rabbitmq_server/templates/post-backup.j2 create mode 100644 roles/rabbitmq_server/templates/pre-backup.j2 diff --git a/roles/matrix_synapse/defaults/main.yml b/roles/matrix_synapse/defaults/main.yml index 1c4c931..3ab0b3d 100644 --- a/roles/matrix_synapse/defaults/main.yml +++ b/roles/matrix_synapse/defaults/main.yml @@ -1,7 +1,7 @@ --- # Synapse version to deploy -synapse_version: 1.33.0 +synapse_version: 1.33.1 # Should ansible handle Synapse upgrades ? If false, only initial install will be done synapse_manage_upgrade: True diff --git a/roles/rabbitmq_server/tasks/install.yml b/roles/rabbitmq_server/tasks/install.yml index c2b84ca..2b5d997 100644 --- a/roles/rabbitmq_server/tasks/install.yml +++ b/roles/rabbitmq_server/tasks/install.yml @@ -6,3 +6,9 @@ - rabbitmq-server tags: rabbitmq +- name: Install pre/post backup hooks + template: src={{ item }}-backup.j2 dest=/etc/backup/{{ item }}.d/rabbitmq mode=755 + loop: + - pre + - post + tags: rabbitmq diff --git a/roles/rabbitmq_server/templates/post-backup.j2 b/roles/rabbitmq_server/templates/post-backup.j2 new file mode 100644 index 0000000..898c2cb --- /dev/null +++ b/roles/rabbitmq_server/templates/post-backup.j2 @@ -0,0 +1,3 @@ +#!/bin/bash -e + +rm -f /home/lbkp/rabbitmq/definitions.json diff --git a/roles/rabbitmq_server/templates/pre-backup.j2 b/roles/rabbitmq_server/templates/pre-backup.j2 new file mode 100644 index 0000000..1f800c0 --- /dev/null +++ b/roles/rabbitmq_server/templates/pre-backup.j2 @@ -0,0 +1,5 @@ +#!/bin/bash -e + +mkdir -p /home/lbkp/rabbitmq/ +/usr/sbin/rabbitmqctl export_definitions --format json definitions.json +mv /var/lib/rabbitmq/definitions.json /home/lbkp/rabbitmq/