30 lines
896 B
YAML
30 lines
896 B
YAML
---
|
|
- name: Get the path of tripleo undercloud config file
|
|
become: true
|
|
hiera: name="tripleo_undercloud_conf_file"
|
|
|
|
- name: Get the Container CLI from the undercloud.conf file
|
|
become: true
|
|
validations_read_ini:
|
|
path: "{{ tripleo_undercloud_conf_file }}"
|
|
section: DEFAULT
|
|
key: container_cli
|
|
ignore_missing_file: true
|
|
register: container_cli
|
|
|
|
- name: Get keystone crontab
|
|
become: true
|
|
shell: |
|
|
set -o pipefail
|
|
{{ container_cli.value|default('podman', true) }} exec keystone_cron crontab -l -u keystone |grep -v '^#'
|
|
register: cron_result
|
|
changed_when: False
|
|
|
|
- name: Check keystone crontab
|
|
fail:
|
|
msg: >-
|
|
keystone token_flush does not appear to be enabled via cron.
|
|
You should add '<desired interval> keystone-manage token_flush'
|
|
to the keystone users crontab."
|
|
when: "cron_result.stdout.find('keystone-manage token_flush') == -1"
|