diff --git a/ansible/roles/elasticsearch/templates/elasticsearch-curator.crontab.j2 b/ansible/roles/elasticsearch/templates/elasticsearch-curator.crontab.j2 index 25bf882c68..6f8a3654a4 100644 --- a/ansible/roles/elasticsearch/templates/elasticsearch-curator.crontab.j2 +++ b/ansible/roles/elasticsearch/templates/elasticsearch-curator.crontab.j2 @@ -1 +1,3 @@ +PATH=/usr/local/bin:/usr/bin:/bin + {{ elasticsearch_curator_cron_schedule }} curator --config /etc/elasticsearch-curator/curator.yml {% if elasticsearch_curator_dry_run|bool %}--dry-run {% endif %}/etc/elasticsearch-curator/actions.yml diff --git a/ansible/roles/elasticsearch/templates/elasticsearch-curator.json.j2 b/ansible/roles/elasticsearch/templates/elasticsearch-curator.json.j2 index 579c98387e..1412731855 100644 --- a/ansible/roles/elasticsearch/templates/elasticsearch-curator.json.j2 +++ b/ansible/roles/elasticsearch/templates/elasticsearch-curator.json.j2 @@ -1,11 +1,12 @@ {% 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": "/var/spool/cron/elasticsearch", - "owner": "root", + "dest": "{{ cron_path }}", + "owner": "elasticsearch", "perm": "0600" }, { diff --git a/releasenotes/notes/bug-1885732-10803d46f9c73444.yaml b/releasenotes/notes/bug-1885732-10803d46f9c73444.yaml new file mode 100644 index 0000000000..16ea7828c7 --- /dev/null +++ b/releasenotes/notes/bug-1885732-10803d46f9c73444.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes the Elasticsearch Curator cron schedule run. + `LP#1885732 `__