kolla-ansible/ansible/roles/common/templates/cron.json.j2
Mark Goddard c70285068c Add logrotate configuration for ironic inspector
Logrotate configuration is missing for ironic-inspector. Prior to [1],
ironic-inspector logs were stored in
kolla_logs/ironic/ironic-inspector.log. After [1], the logs
are stored in kolla_logs/ironic-inspector/ironic-inspector.log
but the logrotate config was not updated.

[1]
07453f3460

Change-Id: I7e78faea361cd67069c1a96aaf0a2ffffc0e8666
Closes-Bug: #1701578
2017-06-30 15:26:40 +01:00

75 lines
2.4 KiB
Django/Jinja

{% set cron_cmd = 'cron -f' if kolla_base_distro in ['ubuntu', 'debian'] else 'crond -s -n' %}
{% set services = [
( 'ansible', 'yes' ),
( 'aodh', enable_aodh ),
( 'barbican', enable_barbican ),
( 'ceilometer', enable_ceilometer ),
( 'ceph', enable_ceph ),
( 'chrony', enable_chrony ),
( 'cinder', enable_cinder ),
( 'cloudkitty', enable_cloudkitty ),
( 'collectd', enable_collectd ),
( 'congress', enable_congress ),
( 'designate', enable_designate ),
( 'elasticsearch', enable_elasticsearch ),
( 'etcd', enable_etcd ),
( 'freezer', enable_freezer ),
( 'glance', enable_glance ),
( 'gnocchi', enable_gnocchi ),
( 'grafana', enable_grafana ),
( 'haproxy', enable_haproxy ),
( 'heat', enable_heat ),
( 'influxdb', enable_influxdb ),
( 'ironic', enable_ironic ),
( 'ironic-inspector', enable_ironic ),
( 'iscsid', enable_iscsid ),
( 'karbor', enable_karbor ),
( 'keepalived', enable_haproxy ),
( 'keystone', enable_keystone ),
( 'kibana', enable_kibana ),
( 'kuryr', enable_kuryr ),
( 'magnum', enable_magnum ),
( 'manila', enable_manila ),
( 'mariadb', enable_mariadb ),
( 'mistral', enable_mistral ),
( 'mongodb', enable_mongodb ),
( 'murano', enable_murano ),
( 'neutron', enable_neutron ),
( 'nova', enable_nova ),
( 'octavia', enable_octavia ),
( 'outward-rabbitmq', enable_outward_rabbitmq ),
( 'panko', enable_panko ),
( 'rabbitmq', enable_rabbitmq ),
( 'rally', enable_rally ),
( 'sahara', enable_sahara ),
( 'searchlight', enable_searchlight ),
( 'senlin', enable_senlin ),
( 'solum', enable_solum ),
( 'swift', enable_swift ),
( 'tacker', enable_tacker ),
( 'tempest', enable_tempest ),
( 'trove', enable_trove ),
( 'watcher', enable_watcher ),
( 'zun', enable_zun )
] %}
{
"command": "{{ cron_cmd }}",
"config_files": [
{
"source": "{{ container_config_directory }}/logrotate/global.conf",
"dest": "/etc/logrotate.conf",
"owner": "root",
"perm": "0600"
},
{% for service, enabled in services if enabled | bool %}
{
"source": "{{ container_config_directory }}/logrotate/{{ service }}.conf",
"dest": "/etc/logrotate.d/{{ service }}.conf",
"owner": "root",
"perm": "0600"
}{{ ',' if not loop.last else '' }}
{% endfor %}
]
}