hostwithquantum.dockerpluginloki
docker-plugin-loki
This guide will help you install and update the Loki plugin for Docker.
Note: Configuring daemon.json is not included in this guide. Please check the official documentation for that.
Requirements
You will need:
- docker/docker-py
- dockerd, which you can get from atosatto/dockerswarm
Role Variables
Here's a quick look at the variables you can set:
| Name | Default Value | Description |
|---|---|---|
docker_loki_version |
latest |
The version of the Loki Docker plugin |
docker_loki_image |
grafana/loki-docker-driver |
The Docker image for the plugin |
docker_loki_docker_unit |
docker |
The name of the SystemD unit for Docker |
Dependencies
Not applicable (n/a)
Example Playbook
You can use the role like this:
- hosts: servers
roles:
- role: hostwithquantum.dockerpluginloki
vars:
docker_loki_version: 1.5.0
If you set become: true: This role expects a standard Docker setup that only requires root privileges to restart dockerd. Ansible will need permission to use sudo to perform the restart after installing or upgrading. All other commands (like docker plugin install) should work without root access. If you run Docker as root, consider adding become: true in your playbook.
License
This role is licensed under the BSD-2-Clause.
Author Information
This section is optional for role authors to share their contact details or website (HTML content is not allowed).
Install and update the loki plugin for Docker
ansible-galaxy install hostwithquantum.dockerpluginloki