From f17bd2db7714571830f6604986e2b157806868a7 Mon Sep 17 00:00:00 2001 From: likui Date: Thu, 2 Dec 2021 14:33:42 +0800 Subject: [PATCH] Add logrotate to libvirt service Change-Id: I5d6af3707c3de4466699f1a0e6ff2f2e2fe4e123 --- ansible/roles/common/tasks/config.yml | 1 + .../roles/common/templates/cron-logrotate-nova-libvirt.conf.j2 | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 ansible/roles/common/templates/cron-logrotate-nova-libvirt.conf.j2 diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index 50eebe99ce..79851c2a4c 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -222,6 +222,7 @@ - { name: "neutron-tls-proxy", enabled: "{{ neutron_enable_tls_backend | bool }}" } - { name: "nova", enabled: "{{ enable_nova | bool }}" } + - { name: "nova-libvirt", enabled: "{{ enable_nova | bool and nova_compute_virt_type in ['kvm', 'qemu'] }}" } - { name: "octavia", enabled: "{{ enable_octavia | bool }}" } - { name: "outward-rabbitmq", enabled: "{{ enable_outward_rabbitmq | bool }}" } - { name: "rabbitmq", enabled: "{{ enable_rabbitmq | bool }}" } diff --git a/ansible/roles/common/templates/cron-logrotate-nova-libvirt.conf.j2 b/ansible/roles/common/templates/cron-logrotate-nova-libvirt.conf.j2 new file mode 100644 index 0000000000..50f493d373 --- /dev/null +++ b/ansible/roles/common/templates/cron-logrotate-nova-libvirt.conf.j2 @@ -0,0 +1,3 @@ +"/var/log/kolla/libvirt/*.log" +{ +}