charm-keystone/templates/keystone-token-flush
Billy Olsen ce7949805f Fix missing keystone user in cron job.
When use_syslog = False, the keystone-token-flush cronjob omits the
keystone username in the cron tab file, which causes cron to skip
the entry and report errors into the cron job. This change fixes
the problem.

Change-Id: I2e96eba9e55d9a7e3b9ade2090f88a74467ba334
Closes-Bug: 1578914
2016-05-05 22:00:51 -07:00

11 lines
473 B
Plaintext

# Purge expired tokens from the keystone database hourly, per OpenStack installation guide.
{% if token_flush -%}
{% if use_syslog -%}
0 * * * * keystone /usr/bin/keystone-manage token_flush 2>&1 | logger -t keystone-token-flush
{% else -%}
0 * * * * keystone /usr/bin/keystone-manage token_flush >> /var/log/keystone/keystone-token-flush.log 2>&1
{% endif -%}
{% else -%}
# Current unit is not the leader unit. Token flush will be managed by the leader unit.
{% endif -%}