From 95b73daa36b23565a8566f71f9b202d3459b685f Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 25 Jun 2023 09:52:36 -0400 Subject: Initial Commit --- .../services/monitoring/promtail/handlers/main.yml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 roles/services/monitoring/promtail/handlers/main.yml (limited to 'roles/services/monitoring/promtail/handlers') 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 @@ +- name: update repos - debian + apt: + update_cache: yes + +- name: update repos - fedora + dnf: + name: "*" + state: latest + +- name: build loki-docker-driver plugin for private repo + become: yes + become_user: "{{ docker_username }}" + environment: + LOKI_DOCKER_DRIVER: "{{ docker_registry_url }}/{{ docker_registry_username }}/loki-docker-driver" + community.general.make: + chdir: "{{ docker_home }}/plugins/loki" + target: docker-driver-push + +- name: restart rootless docker + become: yes + become_user: "{{ docker_username }}" + systemd: + name: docker + enabled: yes + state: restarted + scope: user + environment: + XDG_RUNTIME_DIR: "/run/user/{{ docker_uid }}" + +- name: restart docker + service: + name: docker + state: restarted + +- name: restart promtail + when: promtail_config.changed + service: + name: promtail + state: restarted -- cgit v1.2.3