master
omidshj 2025-02-10 13:40:28 +03:30
parent 1e7eb28897
commit b513fe0d42
1 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,11 @@
become: yes
tasks:
- name: Process each item
block:
include_tasks: self
loop: {{ buckets }}
loop_control:
loop_var: item
- block:
- name: Export data
command: "s3cmd sync --preserve --config {{ config }} s3://{{ item }} {{ backup_dir }}"
- name: Create tar archive
@ -24,5 +28,4 @@
- name: Delete backed-up files
file:
path: "{{ backup_dir }}/{{server}}-{{service}}-{{ item }}.tar.gz"
state: absent
loop: "{{ buckets }}"
state: absent