Skip to content

Commit 47e8e4e

Browse files
authored
Include size storage when listing Zabbix DB dump files (#510)
Use `du` rather than `ls` so that the size of the DB dumps are reported
1 parent 7f6492e commit 47e8e4e

File tree

1 file changed

+11
-0
lines changed
  • Ansible/roles/dump_databases/tasks

1 file changed

+11
-0
lines changed

Ansible/roles/dump_databases/tasks/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,14 @@
1919
path: "{{ item.path }}"
2020
state: absent
2121
loop: "{{ list_old_dumps_zabbix.files }}"
22+
23+
- name: "Get Zabbix database dump names and sizes"
24+
ansible.builtin.shell:
25+
cmd: du -hd1 /data/podman/volumes/postgres/zabbix/backup/*
26+
register: size_zabbix_dump_files
27+
changed_when: false
28+
29+
- name: "Show Zabbix database dump files"
30+
ansible.builtin.debug:
31+
msg: "{{ size_zabbix_dump_files.stdout_lines }}"
32+
when: size_zabbix_dump_files.stdout_lines | length > 0

0 commit comments

Comments
 (0)