9c82ed8071
Co-Authored-By: caoyuan <cao.yuan@99cloud.net> Co-Authored-By: zhubingbing <zhubingbing10@gmail.com> Change-Id: I419f7ceb219ea9643cfd225c130018f967ddd860 Partially-implements: bp freezer-ansible-role
57 lines
1.8 KiB
Django/Jinja
57 lines
1.8 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 ),
|
|
( 'cinder', enable_cinder ),
|
|
( 'cloudkitty', enable_cloudkitty ),
|
|
( 'designate', enable_designate ),
|
|
( 'elasticsearch', enable_elasticsearch ),
|
|
( 'freezer', enable_freezer ),
|
|
( 'glance', enable_glance ),
|
|
( 'gnocchi', enable_gnocchi ),
|
|
( 'grafana', enable_grafana ),
|
|
( 'haproxy', enable_haproxy ),
|
|
( 'heat', enable_heat ),
|
|
( 'iscsid', enable_iscsid ),
|
|
( 'karbor', enable_karbor ),
|
|
( 'keepalived', enable_haproxy ),
|
|
( 'keystone', enable_keystone ),
|
|
( 'magnum', enable_magnum ),
|
|
( 'manila', enable_manila ),
|
|
( 'mariadb', enable_mariadb ),
|
|
( 'mistral', enable_mistral ),
|
|
( 'murano', enable_murano ),
|
|
( 'neutron', enable_neutron ),
|
|
( 'nova', enable_nova ),
|
|
( 'panko', enable_panko ),
|
|
( 'rabbitmq', enable_rabbitmq ),
|
|
( 'sahara', enable_sahara ),
|
|
( 'searchlight', enable_searchlight ),
|
|
( 'senlin', enable_senlin ),
|
|
( 'solum', enable_solum ),
|
|
( 'swift', enable_swift ),
|
|
( 'tacker', enable_tacker )
|
|
] %}
|
|
{
|
|
"command": "{{ cron_cmd }}",
|
|
"config_files": [
|
|
{
|
|
"source": "{{ container_config_directory }}/logrotate/global.conf",
|
|
"dest": "/etc/logrotate.conf",
|
|
"owner": "root",
|
|
"perm": "0644"
|
|
},
|
|
{% for service, enabled in services if enabled | bool %}
|
|
{
|
|
"source": "{{ container_config_directory }}/logrotate/{{ service }}.conf",
|
|
"dest": "/etc/logrotate.d/{{ service }}.conf",
|
|
"owner": "root",
|
|
"perm": "0644"
|
|
}{{ ',' if not loop.last else '' }}
|
|
{% endfor %}
|
|
|
|
]
|
|
}
|