From 959891f06fbeda2db7e4370a93204e27d74a4d09 Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Wed, 24 Apr 2024 07:39:16 +0200 Subject: [PATCH] add setup of backup monitoring --- README.md | 1 + defaults/main.yml | 1 + tasks/main.yml | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 07fa5dd..337cc21 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Role Variables * burp_password - group_names[0]}}/{{ inventory_hostname }}_burp_password * burp_encryption_password - group_names[0]}}/{{ inventory_hostname }}_burp_encryption_password * burp_retention: default [ 7 ] + * burp_watch - wether we monitor backup status - default true Dependencies ------------ diff --git a/defaults/main.yml b/defaults/main.yml index 976954e..79d8168 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,4 +5,5 @@ burp_packages: burp_cname: "{{ ansible_hostname }}" burp_retention: - 7 +burp_watch: true burp_server_directory: "/srv/Backups/{{ group_name[0] | lower }}/{{ inventory_hostname }}/" diff --git a/tasks/main.yml b/tasks/main.yml index 29be65a..d4d0b86 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -82,3 +82,13 @@ src: notify_script dest: /usr/share/burp/scripts/notify_script mode: 0755 + + - name: burp - setup monitoring + when: burp_watch + ansible.builtin.lineinfile: + path: /etc/zabbix/filelist.csv + line: "{{ burp_server_directory }}/{{ ansible_hostname }}/current/timestamp" + + state: present + delegate_to: "{{ burp_server }}" +