Enable traefik access log and log rotation

This commit is contained in:
Jade Ellis
2024-12-01 11:37:37 +00:00
parent 66215952ee
commit e7270d1f7a
4 changed files with 33 additions and 1 deletions
+20 -1
View File
@@ -18,6 +18,22 @@
delete: true # Remove retired containers
- name: Reload systemd generators
ansible.builtin.command: sudo systemctl daemon-reload
- name: Install logrotate
ansible.builtin.package:
name: logrotate
state: present
- name: Copy logrotate config
ansible.posix.synchronize:
src: ../logrotate.d/
dest: /etc/logrotate.d
- name: find files with possible suspect line endings
ansible.builtin.find:
paths: /etc/logrotate.d
patterns: '*'
register: output
- name: fix suspect line endings
replace: path={{item.path}} regexp="\r"
with_items: "{{ output.files }}"
- name: Copy traefik config
ansible.posix.synchronize:
src: ../traefik/
@@ -26,6 +42,10 @@
file:
path: /var/srv/traefik
state: directory
- name: Creates traefik log directory
file:
path: /var/log/traefik
state: directory
- name: Copy kanidm config
ansible.posix.synchronize:
src: ../kanidm/
@@ -99,7 +119,6 @@
path: /var/opt/autokuma
state: directory
# - name: install linux-system-roles
# package:
# name: linux-system-roles