Performance: use a single config file for logrotate
Currently we generate a logrotate configuration file for each enabled service. These are then included from a logrotate.d directory. With a large number of hosts, this can take a long time to template. Benchmarking of templating is available at [1]. This change switches to a single logrotate configuration file for all services, with the include done locally using jinja. This should drastically improve the performance of this task. [1] https://github.com/stackhpc/ansible-scaling/blob/master/doc/template.md Partially-Implements: blueprint performance-improvements Change-Id: I39cfa70bef6560f615cad516c43aaef6a523b964
Showing
- ansible/roles/common/tasks/config.yml 71 additions, 67 deletionsansible/roles/common/tasks/config.yml
- ansible/roles/common/templates/cron-logrotate-global.conf.j2 4 additions, 1 deletionansible/roles/common/templates/cron-logrotate-global.conf.j2
- ansible/roles/common/templates/cron.json.j2 2 additions, 73 deletionsansible/roles/common/templates/cron.json.j2
- releasenotes/notes/logrotate-single-config-663d6bf154218380.yaml 5 additions, 0 deletions...notes/notes/logrotate-single-config-663d6bf154218380.yaml
Loading
Please register or sign in to comment