web-logs: Create directories for parsed logs

This commit is contained in:
Timo Makinen 2021-09-29 18:34:41 +00:00
parent 21484da09c
commit 1aedd1afcc

View file

@ -53,12 +53,27 @@
destination: /var/cache/sync-http-logs destination: /var/cache/sync-http-logs
private_key: /etc/ssh/logsync/id_ed25519 private_key: /etc/ssh/logsync/id_ed25519
- name: create data directories - name: create cache directory
file: file:
path: "{{ item }}" path: /var/cache/sync-http-logs
state: directory state: directory
mode: 0750 mode: 0750
owner: logsync owner: logsync
group: logsync group: logsync
with_items:
- /var/cache/sync-http-logs - name: create log directory
file:
path: /export/web-log
state: directory
mode: 0750
owner: root
group: "{{ ansible_wheel }}"
- name: link data directory
file:
dest: /srv/web-log
src: /export/web-log
state: link
owner: root
group: "{{ ansible_wheel }}"
follow: false