diff options
Diffstat (limited to 'roles/services/monitoring/promtail/handlers')
-rw-r--r-- | roles/services/monitoring/promtail/handlers/main.yml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/roles/services/monitoring/promtail/handlers/main.yml b/roles/services/monitoring/promtail/handlers/main.yml new file mode 100644 index 0000000..97ea7d3 --- /dev/null +++ b/roles/services/monitoring/promtail/handlers/main.yml | |||
@@ -0,0 +1,39 @@ | |||
1 | - name: update repos - debian | ||
2 | apt: | ||
3 | update_cache: yes | ||
4 | |||
5 | - name: update repos - fedora | ||
6 | dnf: | ||
7 | name: "*" | ||
8 | state: latest | ||
9 | |||
10 | - name: build loki-docker-driver plugin for private repo | ||
11 | become: yes | ||
12 | become_user: "{{ docker_username }}" | ||
13 | environment: | ||
14 | LOKI_DOCKER_DRIVER: "{{ docker_registry_url }}/{{ docker_registry_username }}/loki-docker-driver" | ||
15 | community.general.make: | ||
16 | chdir: "{{ docker_home }}/plugins/loki" | ||
17 | target: docker-driver-push | ||
18 | |||
19 | - name: restart rootless docker | ||
20 | become: yes | ||
21 | become_user: "{{ docker_username }}" | ||
22 | systemd: | ||
23 | name: docker | ||
24 | enabled: yes | ||
25 | state: restarted | ||
26 | scope: user | ||
27 | environment: | ||
28 | XDG_RUNTIME_DIR: "/run/user/{{ docker_uid }}" | ||
29 | |||
30 | - name: restart docker | ||
31 | service: | ||
32 | name: docker | ||
33 | state: restarted | ||
34 | |||
35 | - name: restart promtail | ||
36 | when: promtail_config.changed | ||
37 | service: | ||
38 | name: promtail | ||
39 | state: restarted | ||