ansible-roles/elasticsearch/tasks/logs.yml
William Hirigoyen 3f353ad072
All checks were successful
gitea/ansible-roles/pipeline/head This commit looks good
elasticsearch: disable GC logging
2023-03-10 10:29:59 +01:00

21 lines
459 B
YAML

---
- name: Check if cron is installed
shell: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'"
args:
executable: /bin/bash
check_mode: no
failed_when: False
changed_when: False
register: is_cron_installed
- name: "log rotation script"
template:
src: rotate_elasticsearch_logs.j2
dest: /etc/cron.daily/rotate_elasticsearch_logs
owner: root
group: root
mode: "0750"
when: is_cron_installed.rc == 0