ansible.logrotate icon indicating copy to clipboard operation
ansible.logrotate copied to clipboard

Move application configuration to dedicated tasks file

Open jpiron opened this issue 5 years ago • 2 comments

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.

jpiron avatar Feb 13 '20 15:02 jpiron