
This should cleanup our mirror update server so that we no longer have configes (cron, scripts, logrotate rules, etc) for mirroring opensuse. It won't clean up the afs volume, but we can get to that later (and it will probably require manual intervention). This cleanup is done in a way that it should be able to be applied to future cleanups too (like when centos 8 stream goes away and everything is centos stream specific). Change-Id: Ib5d15ce800ff0620187345e1cfec0b7b5d65bee5
10 lines
347 B
YAML
10 lines
347 B
YAML
# Hash the full path to avoid any conflicts but remain idempotent.
|
|
- name: Create a unique config name
|
|
set_fact:
|
|
logrotate_generated_config_file_name: "{{ (logrotate_file_name | hash('sha1'))[0:6] }}.conf"
|
|
|
|
- name: Cleanup the indicated file
|
|
file:
|
|
state: absent
|
|
path: '/etc/logrotate.d/{{ logrotate_generated_config_file_name }}'
|