master
parent
512627a2fb
commit
bff7bd2889
|
@ -3,11 +3,7 @@
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: Process each item
|
- name: Process each item
|
||||||
include_tasks: self
|
block:
|
||||||
loop: "{{ buckets }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: item
|
|
||||||
- block:
|
|
||||||
- name: Export data
|
- name: Export data
|
||||||
command: "s3cmd sync --preserve --config {{ config }} s3://{{ item }} {{ backup_dir }}"
|
command: "s3cmd sync --preserve --config {{ config }} s3://{{ item }} {{ backup_dir }}"
|
||||||
- name: Create tar archive
|
- name: Create tar archive
|
||||||
|
@ -29,3 +25,7 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ backup_dir }}/{{server}}-{{service}}-{{ item }}.tar.gz"
|
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