Skip to content

testing workflow #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions ansible/roles/loki_driver/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
- name: Check if Loki Docker driver plugin is already installed
shell: docker plugin ls | grep -q "loki"
register: loki_plugin_exists
changed_when: false
failed_when: false

- name: Install the Loki Docker driver plugin
shell: |
if ! docker plugin ls | grep -q "loki"; then
docker plugin install grafana/loki-docker-driver:2.9.1 --alias loki --grant-all-permissions
fi
shell: docker plugin install grafana/loki-docker-driver:2.9.1 --alias loki --grant-all-permissions
register: loki_plugin_installed
when: loki_plugin_exists.rc != 0

- name: Create /etc/docker/daemon.json with Loki configuration
copy:
Expand All @@ -17,6 +21,8 @@
}
}
force: yes
when: loki_plugin_installed is changed

- name: Restart Docker service
shell: systemctl restart docker
when: loki_plugin_installed is changed
Loading