Added .cymais.service suffix to make cymais files more visible

This commit is contained in:
2024-01-10 11:18:38 +01:00
parent f3ce00dca7
commit b7e3a7f838
68 changed files with 144 additions and 132 deletions

View File

@@ -10,7 +10,7 @@ This Ansible role is designed to ensure the health of Docker containers running
- `handlers/main.yml`: Handlers to reload and restart the systemd service and timer.
- `files/health-docker-container.sh`: The script that checks the container health.
- `tasks/main.yml`: Tasks to create necessary directories, copy scripts, and create systemd service and timer.
- `templates/health-docker-container.service.j2`: Systemd service template.
- `templates/health-docker-container.cymais.service.j2`: Systemd service template.
- `templates/health-docker-container.timer.j2`: Systemd timer template.
- `meta/main.yml`: Meta information declaring dependencies for the role.

View File

@@ -1,5 +1,5 @@
- name: "reload health-docker-container.service"
- name: "reload health-docker-container.cymais.service"
systemd:
name: health-docker-container.service
name: health-docker-container.cymais.service
enabled: yes
daemon_reload: yes

View File

@@ -11,9 +11,11 @@
dest: "{{health_docker_container_folder}}health-docker-container.sh"
when: run_once_health_docker_container is not defined
- name: create health-docker-container.service
template: src=health-docker-container.service.j2 dest=/etc/systemd/system/health-docker-container.service
notify: reload health-docker-container.service
- name: create health-docker-container.cymais.service
template:
src: health-docker-container.service.j2
dest: /etc/systemd/system/health-docker-container.cymais.service
notify: reload health-docker-container.cymais.service
when: run_once_health_docker_container is not defined
- name: set service_name to the name of the current role

View File

@@ -1,6 +1,6 @@
[Unit]
Description=Checking docker health
OnFailure=systemd-notifier@%n.service
OnFailure=systemd-notifier.cymais@%n.service
[Service]
Type=oneshot