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:
parent
2e2abbedac
commit
d77168ff0c
5 changed files with 40 additions and 0 deletions
1
main.yml
1
main.yml
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -38,5 +38,6 @@
|
|||
# Roles are run first, before tasks, regardless of where you place them here.
|
||||
roles:
|
||||
- base
|
||||
- nvidia-cdi
|
||||
- logdetective
|
||||
- nagios_client
|
||||
|
|
|
|||
15
roles/logdetective/files/logdetective.service
Normal file
15
roles/logdetective/files/logdetective.service
Normal 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
|
||||
4
roles/logdetective/handlers/main.yml
Normal file
4
roles/logdetective/handlers/main.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- name: Reload systemd
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: true
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue