🔨 manage docker plugin
This commit is contained in:
parent
b93a4dc2f8
commit
fb539a0531
@ -101,3 +101,6 @@ promtail_scrape_config:
|
||||
promtail_target_config: []
|
||||
promtail_positions_config:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
|
||||
loki_docker_driver: false
|
@ -32,3 +32,8 @@
|
||||
state: reloaded
|
||||
enabled: true
|
||||
when: ('promtail' in loki_bins)
|
||||
|
||||
- name: Restart Docker
|
||||
ansible.builtin.service:
|
||||
name: docker
|
||||
state: restarted
|
13
tasks/docker_driver.yml
Normal file
13
tasks/docker_driver.yml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
|
||||
- name: Install Loki docker driver
|
||||
community.docker.docker_plugin:
|
||||
plugin_name: grafana/loki-docker-driver:latest
|
||||
alias: loki
|
||||
state: present
|
||||
|
||||
- name: Enable Loki docker driver
|
||||
community.docker.docker_plugin:
|
||||
plugin_name: grafana/loki-docker-driver:latest
|
||||
state: enabled
|
||||
notify: Restart Docker
|
@ -12,3 +12,9 @@
|
||||
become: true
|
||||
tags:
|
||||
- loki_configure
|
||||
|
||||
- name: Install docker driver
|
||||
ansible.builtin.include_tasks: docker_driver.yml
|
||||
when: loki_docker_driver
|
||||
tags:
|
||||
- loki_configure
|
||||
|
Loading…
Reference in New Issue
Block a user