Undo changes as semaphore playbook is not the right place for cleanup.

This commit is contained in:
chsteinle
2021-12-21 07:48:22 +01:00
parent 618f756458
commit a5758f2734

View File

@@ -121,69 +121,6 @@
loop_control:
label: "{{ item.path }}"
- name: Find old daily backups
find:
paths: "{{ item.path | dirname }}/daily"
file_type: file
age: 8d
age_stamp: ctime
patterns: '*.gz'
recurse: false
register: old_files
with_items: "{{ backup_files.results | map(attribute='files') | list }}"
loop_control:
label: "{{ item.path }}"
- name: Print old files
debug:
var: old_files
# - name: Delete old daily backups
# file:
# path: "{{ item.path }}"
# state: absent
# with_items: "{{ backup_files.results | map(attribute='files') | list }}"
# loop_control:
# label: "{{ item.path }}"
#
# - name: Find old weekly backups
# find:
# paths: "{{ backup_dir }}/{{ item }}/weekly"
# file_type: file
# age: 5w
# age_stamp: ctime
# patterns: '*.gz'
# recurse: false
# register: backup_files
# loop: "{{ systems }}"
#
# - name: Delete old weekly backups
# file:
# path: "{{ item.path }}"
# state: absent
# with_items: "{{ backup_files.results | map(attribute='files') | list }}"
# loop_control:
# label: "{{ item.path }}"
#
# - name: Find old monthly backups
# find:
# paths: "{{ backup_dir }}/{{ item }}/monthly"
# file_type: file
# age: 56w
# age_stamp: ctime
# patterns: '*.gz'
# recurse: false
# register: backup_files
# loop: "{{ systems }}"
#
# - name: Delete old monthly backups
# file:
# path: "{{ item.path }}"
# state: absent
# with_items: "{{ backup_files.results | map(attribute='files') | list }}"
# loop_control:
# label: "{{ item.path }}"
- name: Inform Mattermost about success
uri:
url: "{{ mattermost_url }}"