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 role checks for anonymous Docker volumes that are not bound to a container
- `handlers/main.yml`: Handlers to reload and restart the systemd service and timer.
- `files/health-docker-volumes.sh`: The script that checks for anonymous Docker volumes and excludes whitelisted volumes.
- `tasks/main.yml`: Tasks to create necessary directories, copy scripts, and create systemd service and timer.
- `templates/health-docker-volumes.service.j2`: Systemd service template, including the whitelisted volumes as a parameter.
- `templates/health-docker-volumes.cymais.service.j2`: Systemd service template, including the whitelisted volumes as a parameter.
- `templates/health-docker-volumes.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-volumes.service"
- name: "reload health-docker-volumes.cymais.service"
systemd:
name: health-docker-volumes.service
name: health-docker-volumes.cymais.service
enabled: yes
daemon_reload: yes

View File

@@ -11,9 +11,11 @@
dest: "{{health_docker_volumes_folder}}health-docker-volumes.sh"
when: run_once_health_docker_volumes is not defined
- name: create health-docker-volumes.service
template: src=health-docker-volumes.service.j2 dest=/etc/systemd/system/health-docker-volumes.service
notify: reload health-docker-volumes.service
- name: create health-docker-volumes.cymais.service
template:
src: health-docker-volumes.service.j2
dest: /etc/systemd/system/health-docker-volumes.cymais.service
notify: reload health-docker-volumes.cymais.service
when: run_once_health_docker_volumes 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