main.yml 710 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
---
- name: install loki and logcli
  pacman: name=loki,logcli state=present

- name: install loki configuration
  copy: src=loki.yaml dest=/etc/loki/ owner=root group=root mode=0644
  notify: restart loki

- name: make nginx log dir
10
  file: path=/var/log/nginx/loki state=directory owner=root group=root mode=0755
11
12

- name: set up nginx
13
  template: src=nginx.d.conf.j2 dest="/etc/nginx/nginx.d/logging.conf" owner=root group=root mode=640
14
15
16
  notify: reload nginx
  tags: ['nginx']

17
18
19
- name: open firewall hole
  ansible.posix.firewalld: service=http zone=wireguard permanent=true state=enabled immediate=yes

20
21
- name: start and enable loki
  systemd: name=loki.service enabled=yes daemon_reload=yes state=started