1
0
Fork 0
forked from infra/ansible

logdetective: service, dependency on nvidia-cdi

- for persistent deployment

Signed-off-by: Jan Matufka <jmatufka@redhat.com>
This commit is contained in:
Jan Matufka 2026-05-26 10:32:47 +02:00 committed by Jakub Kadlčík
commit d77168ff0c
5 changed files with 40 additions and 0 deletions

View file

@ -33,6 +33,7 @@
- import_playbook: /srv/web/infra/ansible/playbooks/groups/koji-hub.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/kojipkgs.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/logserver.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/logdetective.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/mailman.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/maintainer-test.yml
- import_playbook: /srv/web/infra/ansible/playbooks/groups/mariadb-server.yml

View file

@ -38,5 +38,6 @@
# Roles are run first, before tasks, regardless of where you place them here.
roles:
- base
- nvidia-cdi
- logdetective
- nagios_client

View file

@ -0,0 +1,15 @@
[Unit]
Description=LogDetective compose stack
After=network-online.target nvidia-cdi-generate.service
Wants=network-online.target nvidia-cdi-generate.service
[Service]
Type=simple
WorkingDirectory=/root/logdetective
ExecStart=/usr/bin/podman-compose -f /root/logdetective/docker-compose-prod.yaml up --abort-on-container-failure
ExecStopPost=/usr/bin/podman-compose -f /root/logdetective/docker-compose-prod.yaml down
Restart=on-failure
RestartSec=20
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,4 @@
---
- name: Reload systemd
ansible.builtin.systemd:
daemon_reload: true

View file

@ -144,3 +144,22 @@
with_items:
- http
- https
- name: Install logdetective systemd service
ansible.builtin.copy:
src: logdetective.service
dest: /etc/systemd/system/logdetective.service
owner: root
group: root
mode: "0644"
notify:
- Reload systemd
tags:
- config
- name: Enable and start logdetective service
ansible.builtin.systemd:
name: logdetective.service
enabled: true
state: started
daemon_reload: true