xoxys.logrotate/tasks/main.yml
Robert Kaussow 5b2ad0da4c
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/notify Pipeline was successful
ci: migrate to woodpecker
2024-02-18 20:19:33 +01:00

25 lines
666 B
YAML

---
- name: Install logrotate packages
ansible.builtin.package:
name: "{{ logrotate_package }}"
state: present
- name: Create logrotate configuration file
ansible.builtin.template:
src: etc/logrotate.conf.j2
dest: /etc/logrotate.conf
owner: root
group: root
mode: "0644"
- name: Create logrotate application configuration files
ansible.builtin.template:
src: etc/logrotate.d/config.j2
dest: "/etc/logrotate.d/{{ item.name }}"
owner: root
group: root
mode: "0644"
loop: "{{ logrotate_config + logrotate_app_config + logrotate_app_config_extra }}"
loop_control:
label: "/etc/logrotate.d/{{ item.name }}"