ansible.logrotate
ansible.logrotate copied to clipboard
Move application configuration to dedicated tasks file
This allows to use the tasks_from option of the import_role module. This permits to install and configure logrotate basics in one playbook, and to configure application specifics in another application specific playbook with something like:
- name: "Configure log rotation."
import_role:
name: ansible.logrotate
tasks_from: configure_application
become: True
vars:
logrotate_applications: "{{ redis_logrotate_configurations }}"
when: redis_logrotate_configurations is defined
for instance.