1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/promtail/tasks/main.yml
Evangelos Foutras 578b781966
Capitalize the handler name in handler invocations
Fixes: 26f289b72bfb ("Capitalize the first letter of all task names")
2022-08-29 21:46:39 +03:00

23 lines
988 B
YAML

- name: Install promtail
pacman: name=promtail state=present
- name: Install promtail configuration
template: src=promtail.yaml.j2 dest=/etc/loki/promtail.yaml owner=root group=promtail mode=0640
notify: Restart promtail
- name: Open promtail ipv4 port for monitoring.archlinux.org
ansible.posix.firewalld: zone=wireguard state=enabled permanent=true immediate=yes
rich_rule="rule family=ipv4 source address={{ hostvars['monitoring.archlinux.org']['wireguard_address'] }} port protocol=tcp port=9080 accept"
tags:
- firewall
- name: Create drop-in directory for promtail.service
file: path=/etc/systemd/system/promtail.service.d state=directory owner=root group=root mode=0755
- name: Install drop-in for promtail.service
copy: src=override.conf dest=/etc/systemd/system/promtail.service.d/ owner=root group=root mode=0644
notify: Restart promtail
- name: Start and enable promtail
systemd: name=promtail.service enabled=yes daemon_reload=yes state=started