Add panko-expirer cron job

Automatically delete events when TTL for events
is greater than zero.

Change-Id: Ifecec755edc4d9b1eb202abceb7fecd5aaf87fe7
This commit is contained in:
Christian Zunker 2018-12-24 09:37:41 +01:00
parent 72af75844a
commit 5a6add8c88
3 changed files with 18 additions and 0 deletions

View File

@ -108,6 +108,13 @@ panko_service_adminurl: "{{ panko_service_adminuri }}"
panko_service_in_ldap: false
# Panko expirer
# TTL in seconds
panko_event_time_to_live: -1
# Any of the following special times are valid:
# reboot, yearly, annually, monthly, weekly, daily, hourly
panko_expirer_job_time: daily
# Common pip packages
panko_pip_packages:
- alembic>=0.7.2

View File

@ -47,3 +47,13 @@
mode: "0755"
notify:
- Restart web server
- name: Create cron job for panko event expirer
cron:
name: "Purge old panko events"
user: "{{ panko_system_user_name }}"
specialtime: "{{ panko_expirer_job_time }}"
job: "{{ panko_bin }}/panko-expirer"
when:
- inventory_hostname == groups['panko_all'][0]
- panko_event_time_to_live > 0

View File

@ -7,6 +7,7 @@ debug = {{ debug }}
[database]
connection = {{ panko_connection_string }}
event_time_to_live = {{ panko_event_time_to_live }}
[keystone_authtoken]
auth_type = {{ panko_keystone_auth_plugin }}