master
parent
512627a2fb
commit
bff7bd2889
|
@ -3,11 +3,7 @@
|
|||
become: yes
|
||||
tasks:
|
||||
- name: Process each item
|
||||
include_tasks: self
|
||||
loop: "{{ buckets }}"
|
||||
loop_control:
|
||||
loop_var: item
|
||||
- block:
|
||||
block:
|
||||
- name: Export data
|
||||
command: "s3cmd sync --preserve --config {{ config }} s3://{{ item }} {{ backup_dir }}"
|
||||
- name: Create tar archive
|
||||
|
@ -28,4 +24,8 @@
|
|||
- name: Delete backed-up files
|
||||
file:
|
||||
path: "{{ backup_dir }}/{{server}}-{{service}}-{{ item }}.tar.gz"
|
||||
state: absent
|
||||
state: absent
|
||||
when: item is defined
|
||||
loop: '{{ buckets }}'
|
||||
loop_control:
|
||||
loop_var: item
|
Loading…
Reference in New Issue