Add panko-expirer cron job
Automatically delete events when TTL for events is greater than zero. Change-Id: Ifecec755edc4d9b1eb202abceb7fecd5aaf87fe7
This commit is contained in:
parent
72af75844a
commit
5a6add8c88
|
@ -108,6 +108,13 @@ panko_service_adminurl: "{{ panko_service_adminuri }}"
|
||||||
|
|
||||||
panko_service_in_ldap: false
|
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
|
# Common pip packages
|
||||||
panko_pip_packages:
|
panko_pip_packages:
|
||||||
- alembic>=0.7.2
|
- alembic>=0.7.2
|
||||||
|
|
|
@ -47,3 +47,13 @@
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
notify:
|
notify:
|
||||||
- Restart web server
|
- 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
|
|
@ -7,6 +7,7 @@ debug = {{ debug }}
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
connection = {{ panko_connection_string }}
|
connection = {{ panko_connection_string }}
|
||||||
|
event_time_to_live = {{ panko_event_time_to_live }}
|
||||||
|
|
||||||
[keystone_authtoken]
|
[keystone_authtoken]
|
||||||
auth_type = {{ panko_keystone_auth_plugin }}
|
auth_type = {{ panko_keystone_auth_plugin }}
|
||||||
|
|
Loading…
Reference in New Issue