Skip to content

Commit

Permalink
Merge pull request #610 from rjshrjndrn/release-2.2.0
Browse files Browse the repository at this point in the history
Issue #000 feat: cleanup for backup
  • Loading branch information
G33tha authored Jul 11, 2019
2 parents cd0d2be + b9f1489 commit 9f98627
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions ansible/roles/prometheus-backup-v2/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
---
# tasks file for ansible/roles/prometheus-backup-v2
# Issue: https://github.com/prometheus/prometheus/issues/5686
- name: preparing snapshot
uri:
url: "{{ prometheus_url }}/api/v1/admin/tsdb/snapshot"
method: POST
register: temp_snap

- name: taking snapshot
uri:
url: "{{ prometheus_url }}/api/v1/admin/tsdb/snapshot?skip_head=True"
Expand All @@ -32,11 +26,8 @@

- name: Deleting snapshot
file:
path: "{{ prometheus_data_dir }}/snapshots/{{ item }}"
path: "{{ prometheus_data_dir }}/snapshots/{{ snapshot_name }}"
state: absent
with_items:
- "{{ snapshot_name }}"
- "{{ temp_snap.json.data.name }}"

- name: Deleting archive snapshot
file:
Expand Down

0 comments on commit 9f98627

Please sign in to comment.