From 8775123b2371c84030320f12779d1c8e5f049584 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 17 Oct 2016 20:50:58 +0200 Subject: [PATCH] Add logrotate configuration for elasticsearch Change-Id: I6af9935e46dcd3c2f9ea18545e059e055b840d90 Closes-bug: #1634223 --- ansible/roles/common/tasks/config.yml | 3 ++- .../common/templates/cron-logrotate-elasticsearch.conf.j2 | 3 +++ ansible/roles/common/templates/cron.json.j2 | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 ansible/roles/common/templates/cron-logrotate-elasticsearch.conf.j2 diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index a13fa96d24..ee2b3d77bb 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -27,7 +27,7 @@ with_items: - { name: "aodh", enabled: "{{ enable_aodh }}" } - { name: "barbican", enabled: "{{ enable_barbican }}"} - - { name: "elasticsearch", enabled: "{{ enable_central_logging }}" } + - { name: "elasticsearch", enabled: "{{ enable_elasticsearch }}" } - { name: "global", enabled: "yes" } - { name: "gnocchi", enabled: "{{ enable_gnocchi }}" } - { name: "haproxy", enabled: "{{ enable_haproxy }}" } @@ -74,6 +74,7 @@ - { name: "barbican", enabled: "{{ enable_barbican }}" } - { name: "cinder", enabled: "{{ enable_cinder }}" } - { name: "cloudkitty", enabled: "{{ enable_cloudkitty }}" } + - { name: "elasticsearch", enabled: "{{ enable_elasticsearch }}" } - { name: "glance", enabled: "{{ enable_glance }}" } - { name: "global", enabled: "yes" } - { name: "gnocchi", enabled: "{{ enable_gnocchi }}" } diff --git a/ansible/roles/common/templates/cron-logrotate-elasticsearch.conf.j2 b/ansible/roles/common/templates/cron-logrotate-elasticsearch.conf.j2 new file mode 100644 index 0000000000..cbdd2c780a --- /dev/null +++ b/ansible/roles/common/templates/cron-logrotate-elasticsearch.conf.j2 @@ -0,0 +1,3 @@ +"/var/log/kolla/elasticsearch/*.log" +{ +} diff --git a/ansible/roles/common/templates/cron.json.j2 b/ansible/roles/common/templates/cron.json.j2 index e90ab4f9ca..8dae117a4b 100644 --- a/ansible/roles/common/templates/cron.json.j2 +++ b/ansible/roles/common/templates/cron.json.j2 @@ -5,6 +5,7 @@ ( 'barbican', enable_barbican ), ( 'cinder', enable_cinder ), ( 'cloudkitty', enable_cloudkitty ), + ( 'elasticsearch', enable_elasticsearch ), ( 'glance', enable_glance ), ( 'gnocchi', enable_gnocchi ), ( 'haproxy', enable_haproxy ),