kolla-ansible/ansible/roles/elasticsearch/templates/elasticsearch-curator.json.j2
Radosław Piliszek 852c7a32c3 Fix the Elasticsearch Curator cron schedule run
There were two issues with it. Lack of /usr/local/bin in PATH
for CentOS and wrong crontab path for Ubuntu/Debian.
This patch mirrors how it is handled in keystone.

Change-Id: Ib54b261e12c409d66b792648807646015826e83c
Closes-Bug: #1885732
2020-06-30 16:39:55 +02:00

33 lines
1.1 KiB
Django/Jinja

{% set cron_cmd = 'cron -f' if kolla_base_distro in ['ubuntu', 'debian'] else 'crond -s -n' %}
{% set cron_path = '/var/spool/cron/crontabs/elasticsearch' if kolla_base_distro in ['ubuntu', 'debian'] else '/var/spool/cron/elasticsearch' %}
{
"command": "{{ cron_cmd }}",
"config_files": [
{
"source": "{{ container_config_directory }}/elasticsearch-curator.crontab",
"dest": "{{ cron_path }}",
"owner": "elasticsearch",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/elasticsearch-curator.yml",
"dest": "/etc/elasticsearch-curator/curator.yml",
"owner": "elasticsearch",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/elasticsearch-curator-actions.yml",
"dest": "/etc/elasticsearch-curator/actions.yml",
"owner": "elasticsearch",
"perm": "0600"
}
],
"permissions": [
{
"path": "/var/log/kolla/elasticsearch",
"owner": "elasticsearch:elasticsearch",
"recurse": true
}
]
}