From b7e3a7f8389d4758ce56163908c8026232ae9f70 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 10 Jan 2024 11:18:38 +0100 Subject: [PATCH] Added .cymais.service suffix to make cymais files more visible --- roles/backup-data-to-usb/handlers/main.yml | 4 ++-- roles/backup-data-to-usb/tasks/main.yml | 4 ++-- .../templates/backup-data-to-usb.service.j2 | 4 ++-- roles/backup-docker-to-local/handlers/main.yml | 4 ++-- roles/backup-docker-to-local/tasks/main.yml | 12 ++++++------ .../backup-docker-to-local-everything.service.j2 | 2 +- .../templates/backup-docker-to-local.service.j2 | 2 +- roles/backup-remote-to-local/README.md | 4 ++-- roles/backup-remote-to-local/handlers/main.yml | 2 +- roles/backup-remote-to-local/tasks/main.yml | 6 ++++-- .../templates/backup-remote-to-local.service.j2 | 2 +- roles/cleanup-backups-service/handlers/main.yml | 4 ++-- roles/cleanup-backups-service/tasks/main.yml | 6 +++--- .../templates/cleanup-backups.service.j2 | 2 +- roles/cleanup-disc-space/handlers/main.yml | 4 ++-- roles/cleanup-disc-space/tasks/main.yml | 6 +++--- .../templates/cleanup-disc-space.service.j2 | 2 +- .../handlers/main.yml | 4 ++-- roles/cleanup-failed-docker-backups/tasks/main.yml | 6 +++--- .../cleanup-failed-docker-backups.service.j2 | 2 +- roles/client-wireguard/files/set-mtu.service | 4 ++-- roles/client-wireguard/handlers/main.yml | 4 ++-- roles/client-wireguard/tasks/main.yml | 8 ++++---- roles/docker-mailu/handlers/main.yml | 4 ++-- roles/docker-mailu/tasks/main.yml | 6 +++--- .../templates/deploy-letsencrypt-mailu.service.j2 | 2 +- .../tasks/setup_timers.yml | 4 ++-- .../templates/keyboard-color.service.j2 | 2 +- roles/heal-docker/files/heal-docker.py | 4 ++-- roles/heal-docker/handlers/main.yml | 4 ++-- roles/heal-docker/tasks/main.yml | 6 +++--- roles/heal-docker/templates/heal-docker.service.j2 | 2 +- roles/health-btrfs/handlers/main.yml | 4 ++-- roles/health-btrfs/tasks/main.yml | 6 +++--- .../health-btrfs/templates/health-btrfs.service.j2 | 2 +- roles/health-disc-space/handlers/main.yml | 4 ++-- roles/health-disc-space/tasks/main.yml | 6 +++--- .../templates/health-disc-space.service.j2 | 2 +- roles/health-docker-container/README.md | 2 +- roles/health-docker-container/handlers/main.yml | 4 ++-- roles/health-docker-container/tasks/main.yml | 8 +++++--- .../templates/health-docker-container.service.j2 | 2 +- roles/health-docker-volumes/README.md | 2 +- roles/health-docker-volumes/handlers/main.yml | 4 ++-- roles/health-docker-volumes/tasks/main.yml | 8 +++++--- .../templates/health-docker-volumes.service.j2 | 2 +- roles/health-journalctl/handlers/main.yml | 4 ++-- roles/health-journalctl/tasks/main.yml | 6 +++--- .../templates/health-journalctl.service.j2 | 2 +- roles/health-nginx/README.md | 4 ++-- roles/health-nginx/handlers/main.yml | 4 ++-- roles/health-nginx/tasks/main.yml | 6 +++--- .../health-nginx/templates/health-nginx.service.j2 | 2 +- roles/nginx-certbot/handlers/main.yml | 2 +- roles/nginx-certbot/tasks/main.yml | 4 ++-- .../templates/nginx-certbot.service.j2 | 2 +- roles/systemd-notifier-email/handlers/main.yml | 2 +- roles/systemd-notifier-email/tasks/main.yml | 14 ++++++++++---- roles/systemd-notifier-telegram/handlers/main.yml | 2 +- roles/systemd-notifier-telegram/tasks/main.yml | 4 ++-- roles/systemd-notifier/handlers/main.yml | 2 +- roles/systemd-notifier/tasks/main.yml | 4 ++-- .../templates/systemd-notifier@.service.j2 | 2 +- roles/systemd-timer/templates/dummy.timer.j2 | 2 +- roles/update-docker/tasks/main.yml | 12 ++++++------ .../templates/update-docker.service.j2 | 2 +- roles/wireguard/README.md | 4 ++-- roles/wireguard/handlers/main.yml | 2 +- 68 files changed, 144 insertions(+), 132 deletions(-) diff --git a/roles/backup-data-to-usb/handlers/main.yml b/roles/backup-data-to-usb/handlers/main.yml index 1f45a204..6128c5a2 100644 --- a/roles/backup-data-to-usb/handlers/main.yml +++ b/roles/backup-data-to-usb/handlers/main.yml @@ -1,5 +1,5 @@ -- name: "reload backup-data-to-usb.service" +- name: "reload backup-data-to-usb.cymais.service" systemd: - name: backup-data-to-usb.service + name: backup-data-to-usb.cymais.service state: reloaded daemon_reload: yes diff --git a/roles/backup-data-to-usb/tasks/main.yml b/roles/backup-data-to-usb/tasks/main.yml index 54d432ad..e2b0dc1c 100644 --- a/roles/backup-data-to-usb/tasks/main.yml +++ b/roles/backup-data-to-usb/tasks/main.yml @@ -9,8 +9,8 @@ - name: Copy systemd service to systemd directory template: src: backup-data-to-usb.service.j2 - dest: /etc/systemd/system/backup-data-to-usb.service + dest: /etc/systemd/system/backup-data-to-usb.cymais.service owner: root group: root mode: '0644' - notify: reload backup-data-to-usb.service \ No newline at end of file + notify: reload backup-data-to-usb.cymais.service \ No newline at end of file diff --git a/roles/backup-data-to-usb/templates/backup-data-to-usb.service.j2 b/roles/backup-data-to-usb/templates/backup-data-to-usb.service.j2 index 2e6cdee8..d089ac16 100644 --- a/roles/backup-data-to-usb/templates/backup-data-to-usb.service.j2 +++ b/roles/backup-data-to-usb/templates/backup-data-to-usb.service.j2 @@ -1,11 +1,11 @@ [Unit] Description=Backup to USB when mounted to {{ backup_to_usb_mount }} Wants={{systemctl_mount_service_name}} -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] ExecStart=/bin/python {{ backup_to_usb_script_path }} {{backup_to_usb_source}} {{backup_to_usb_destination}} -ExecStartPost=/bin/systemctl start cleanup-backups.service +ExecStartPost=/bin/systemctl start cleanup-backups.cymais.service [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/roles/backup-docker-to-local/handlers/main.yml b/roles/backup-docker-to-local/handlers/main.yml index f44f6d7c..498593d0 100644 --- a/roles/backup-docker-to-local/handlers/main.yml +++ b/roles/backup-docker-to-local/handlers/main.yml @@ -1,4 +1,4 @@ -- name: "reload backup-docker-to-local.service" +- name: "reload backup-docker-to-local.cymais.service" systemd: - name: backup-docker-to-local.service + name: backup-docker-to-local.cymais.service daemon_reload: yes \ No newline at end of file diff --git a/roles/backup-docker-to-local/tasks/main.yml b/roles/backup-docker-to-local/tasks/main.yml index 975a2c6b..c61a5f1d 100644 --- a/roles/backup-docker-to-local/tasks/main.yml +++ b/roles/backup-docker-to-local/tasks/main.yml @@ -14,18 +14,18 @@ ignore_errors: true when: run_once_backup_docker_to_local is not defined -- name: configure backup-docker-to-local-everything.service +- name: configure backup-docker-to-local-everything.cymais.service template: src: backup-docker-to-local-everything.service.j2 - dest: /etc/systemd/system/backup-docker-to-local-everything.service - notify: reload backup-docker-to-local-everything.service + dest: /etc/systemd/system/backup-docker-to-local-everything.cymais.service + notify: reload backup-docker-to-local-everything.cymais.service when: run_once_backup_docker_to_local is not defined -- name: configure backup-docker-to-local.service +- name: configure backup-docker-to-local.cymais.service template: src: backup-docker-to-local.service.j2 - dest: /etc/systemd/system/backup-docker-to-local.service - notify: reload backup-docker-to-local.service + dest: /etc/systemd/system/backup-docker-to-local.cymais.service + notify: reload backup-docker-to-local.cymais.service when: run_once_backup_docker_to_local is not defined - name: set service_name to the name of the current role diff --git a/roles/backup-docker-to-local/templates/backup-docker-to-local-everything.service.j2 b/roles/backup-docker-to-local/templates/backup-docker-to-local-everything.service.j2 index bdb2b638..1634b531 100644 --- a/roles/backup-docker-to-local/templates/backup-docker-to-local-everything.service.j2 +++ b/roles/backup-docker-to-local/templates/backup-docker-to-local-everything.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=backup docker volumes to local folder -OnFailure=systemd-notifier@%n.service cleanup-failed-docker-backups.service +OnFailure=systemd-notifier.cymais@%n.service cleanup-failed-docker-backups.cymais.service [Service] Type=oneshot diff --git a/roles/backup-docker-to-local/templates/backup-docker-to-local.service.j2 b/roles/backup-docker-to-local/templates/backup-docker-to-local.service.j2 index c64641f6..2ef790c4 100644 --- a/roles/backup-docker-to-local/templates/backup-docker-to-local.service.j2 +++ b/roles/backup-docker-to-local/templates/backup-docker-to-local.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=backup docker volumes to local folder -OnFailure=systemd-notifier@%n.service cleanup-failed-docker-backups.service +OnFailure=systemd-notifier.cymais@%n.service cleanup-failed-docker-backups.cymais.service [Service] Type=oneshot diff --git a/roles/backup-remote-to-local/README.md b/roles/backup-remote-to-local/README.md index 22d808c3..51fa3167 100644 --- a/roles/backup-remote-to-local/README.md +++ b/roles/backup-remote-to-local/README.md @@ -15,12 +15,12 @@ To track what the service is doing execute one of the following commands: #### systemctl ```bash - watch -n2 "systemctl status backup-remote-to-local.service" + watch -n2 "systemctl status backup-remote-to-local.cymais.service" ``` #### journalctl ```bash - journalctl -fu backup-remote-to-local.service + journalctl -fu backup-remote-to-local.cymais.service ``` ### history diff --git a/roles/backup-remote-to-local/handlers/main.yml b/roles/backup-remote-to-local/handlers/main.yml index 3b4a529c..d767c210 100644 --- a/roles/backup-remote-to-local/handlers/main.yml +++ b/roles/backup-remote-to-local/handlers/main.yml @@ -1,6 +1,6 @@ - name: "reload backup-remote-to-local service" systemd: - name: backup-remote-to-local.service + name: backup-remote-to-local.cymais.service daemon_reload: yes - name: "restart backup-remote-to-local timer" diff --git a/roles/backup-remote-to-local/tasks/main.yml b/roles/backup-remote-to-local/tasks/main.yml index 0aafc60b..6722666b 100644 --- a/roles/backup-remote-to-local/tasks/main.yml +++ b/roles/backup-remote-to-local/tasks/main.yml @@ -10,8 +10,10 @@ dest: "{{docker_backup_remote_to_local_folder}}backup-remote-to-local.sh" mode: 0755 -- name: create backup-remote-to-local.service - template: src=backup-remote-to-local.service.j2 dest=/etc/systemd/system/backup-remote-to-local.service +- name: create backup-remote-to-local.cymais.service + template: + src: backup-remote-to-local.service.j2 + dest: /etc/systemd/system/backup-remote-to-local.cymais.service notify: reload backup-remote-to-local service - name: create backups-remote-to-local.sh diff --git a/roles/backup-remote-to-local/templates/backup-remote-to-local.service.j2 b/roles/backup-remote-to-local/templates/backup-remote-to-local.service.j2 index 4dea5cf7..b7600535 100644 --- a/roles/backup-remote-to-local/templates/backup-remote-to-local.service.j2 +++ b/roles/backup-remote-to-local/templates/backup-remote-to-local.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=pull remote backups -OnFailure=systemd-notifier@%n.service cleanup-failed-docker-backups.service +OnFailure=systemd-notifier.cymais@%n.service cleanup-failed-docker-backups.cymais.service [Service] Type=oneshot diff --git a/roles/cleanup-backups-service/handlers/main.yml b/roles/cleanup-backups-service/handlers/main.yml index 062fb33f..1f0af609 100644 --- a/roles/cleanup-backups-service/handlers/main.yml +++ b/roles/cleanup-backups-service/handlers/main.yml @@ -1,5 +1,5 @@ -- name: "reload cleanup-backups.service" +- name: "reload cleanup-backups.cymais.service" systemd: - name: cleanup-backups.service + name: cleanup-backups.cymais.service enabled: yes daemon_reload: yes diff --git a/roles/cleanup-backups-service/tasks/main.yml b/roles/cleanup-backups-service/tasks/main.yml index 3a8b7c15..c324dc93 100644 --- a/roles/cleanup-backups-service/tasks/main.yml +++ b/roles/cleanup-backups-service/tasks/main.yml @@ -19,11 +19,11 @@ dest: "{{docker_cleanup_backups}}cleanup-backups.py" when: run_once_cleanup_backups_service is not defined -- name: create cleanup-backups.service +- name: create cleanup-backups.cymais.service template: src: "cleanup-backups.service.j2" - dest: "/etc/systemd/system/cleanup-backups.service" - notify: reload cleanup-backups.service + dest: "/etc/systemd/system/cleanup-backups.cymais.service" + notify: reload cleanup-backups.cymais.service when: run_once_cleanup_backups_service is not defined - name: run the cleanup_backups_service tasks once diff --git a/roles/cleanup-backups-service/templates/cleanup-backups.service.j2 b/roles/cleanup-backups-service/templates/cleanup-backups.service.j2 index d09f9849..11d534a7 100644 --- a/roles/cleanup-backups-service/templates/cleanup-backups.service.j2 +++ b/roles/cleanup-backups-service/templates/cleanup-backups.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=delete old backups -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/cleanup-disc-space/handlers/main.yml b/roles/cleanup-disc-space/handlers/main.yml index 3f342c5e..8c4f180c 100644 --- a/roles/cleanup-disc-space/handlers/main.yml +++ b/roles/cleanup-disc-space/handlers/main.yml @@ -1,5 +1,5 @@ -- name: "reload cleanup-disc-space.service" +- name: "reload cleanup-disc-space.cymais.service" systemd: - name: cleanup-disc-space.service + name: cleanup-disc-space.cymais.service enabled: yes daemon_reload: yes diff --git a/roles/cleanup-disc-space/tasks/main.yml b/roles/cleanup-disc-space/tasks/main.yml index ef0d90df..1e336ee3 100644 --- a/roles/cleanup-disc-space/tasks/main.yml +++ b/roles/cleanup-disc-space/tasks/main.yml @@ -9,11 +9,11 @@ src: cleanup-disc-space.sh.j2 dest: "{{cleanup_disc_space_folder}}cleanup-disc-space.sh" -- name: create cleanup-disc-space.service +- name: create cleanup-disc-space.cymais.service template: src: cleanup-disc-space.service.j2 - dest: /etc/systemd/system/cleanup-disc-space.service - notify: reload cleanup-disc-space.service + dest: /etc/systemd/system/cleanup-disc-space.cymais.service + notify: reload cleanup-disc-space.cymais.service - name: set service_name to the name of the current role set_fact: diff --git a/roles/cleanup-disc-space/templates/cleanup-disc-space.service.j2 b/roles/cleanup-disc-space/templates/cleanup-disc-space.service.j2 index 91375b96..20106966 100644 --- a/roles/cleanup-disc-space/templates/cleanup-disc-space.service.j2 +++ b/roles/cleanup-disc-space/templates/cleanup-disc-space.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=freeing disc space -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/cleanup-failed-docker-backups/handlers/main.yml b/roles/cleanup-failed-docker-backups/handlers/main.yml index d96a6ae6..1c6378ef 100644 --- a/roles/cleanup-failed-docker-backups/handlers/main.yml +++ b/roles/cleanup-failed-docker-backups/handlers/main.yml @@ -1,5 +1,5 @@ -- name: "reload cleanup-failed-docker-backups.service daemon" +- name: "reload cleanup-failed-docker-backups.cymais.service daemon" systemd: - name: cleanup-failed-docker-backups.service + name: cleanup-failed-docker-backups.cymais.service enabled: yes daemon_reload: yes \ No newline at end of file diff --git a/roles/cleanup-failed-docker-backups/tasks/main.yml b/roles/cleanup-failed-docker-backups/tasks/main.yml index 503cb31b..7af9a5b2 100644 --- a/roles/cleanup-failed-docker-backups/tasks/main.yml +++ b/roles/cleanup-failed-docker-backups/tasks/main.yml @@ -6,11 +6,11 @@ ignore_errors: true when: run_once_cleanup_failed_docker_backups is not defined -- name: configure cleanup-failed-docker-backups.service +- name: configure cleanup-failed-docker-backups.cymais.service template: src: cleanup-failed-docker-backups.service.j2 - dest: /etc/systemd/system/cleanup-failed-docker-backups.service - notify: reload cleanup-failed-docker-backups.service daemon + dest: /etc/systemd/system/cleanup-failed-docker-backups.cymais.service + notify: reload cleanup-failed-docker-backups.cymais.service daemon when: run_once_cleanup_failed_docker_backups is not defined - name: set service_name to the name of the current role diff --git a/roles/cleanup-failed-docker-backups/templates/cleanup-failed-docker-backups.service.j2 b/roles/cleanup-failed-docker-backups/templates/cleanup-failed-docker-backups.service.j2 index e047cf65..5efd90ed 100644 --- a/roles/cleanup-failed-docker-backups/templates/cleanup-failed-docker-backups.service.j2 +++ b/roles/cleanup-failed-docker-backups/templates/cleanup-failed-docker-backups.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=Cleaning up failed docker volume backups -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/client-wireguard/files/set-mtu.service b/roles/client-wireguard/files/set-mtu.service index 8c2d3c29..43f800ee 100644 --- a/roles/client-wireguard/files/set-mtu.service +++ b/roles/client-wireguard/files/set-mtu.service @@ -1,10 +1,10 @@ [Unit] Description=set MTU -Before=wg-quick@wg0.service +Before=wg-quick@wg0.cymais.service [Service] Type=oneshot ExecStart=bash /usr/local/bin/set-mtu.sh [Install] -RequiredBy=wg-quick@wg0.service \ No newline at end of file +RequiredBy=wg-quick@wg0.cymais.service \ No newline at end of file diff --git a/roles/client-wireguard/handlers/main.yml b/roles/client-wireguard/handlers/main.yml index d6b27b95..9e8eba89 100644 --- a/roles/client-wireguard/handlers/main.yml +++ b/roles/client-wireguard/handlers/main.yml @@ -1,6 +1,6 @@ -- name: "restart set-mtu.service" +- name: "restart set-mtu.cymais.service" systemd: - name: set-mtu.service + name: set-mtu.cymais.service state: restarted enabled: yes daemon_reload: yes \ No newline at end of file diff --git a/roles/client-wireguard/tasks/main.yml b/roles/client-wireguard/tasks/main.yml index 1e0b7cc7..6ef06f57 100644 --- a/roles/client-wireguard/tasks/main.yml +++ b/roles/client-wireguard/tasks/main.yml @@ -1,11 +1,11 @@ -- name: create set-mtu.service +- name: create set-mtu.cymais.service copy: src: set-mtu.service - dest: /etc/systemd/system/set-mtu.service - notify: restart set-mtu.service + dest: /etc/systemd/system/set-mtu.cymais.service + notify: restart set-mtu.cymais.service - name: create set-mtu.sh template: src: set-mtu.sh.j2 dest: /usr/local/bin/set-mtu.sh - notify: restart set-mtu.service + notify: restart set-mtu.cymais.service diff --git a/roles/docker-mailu/handlers/main.yml b/roles/docker-mailu/handlers/main.yml index 1d8aec4a..fa1e3264 100644 --- a/roles/docker-mailu/handlers/main.yml +++ b/roles/docker-mailu/handlers/main.yml @@ -1,7 +1,7 @@ --- -- name: "restart deploy-letsencrypt-mailu.service" +- name: "restart deploy-letsencrypt-mailu.cymais.service" systemd: - name: deploy-letsencrypt-mailu.service + name: deploy-letsencrypt-mailu.cymais.service state: restarted enabled: yes daemon_reload: yes \ No newline at end of file diff --git a/roles/docker-mailu/tasks/main.yml b/roles/docker-mailu/tasks/main.yml index af6e1625..4df24d92 100644 --- a/roles/docker-mailu/tasks/main.yml +++ b/roles/docker-mailu/tasks/main.yml @@ -48,11 +48,11 @@ src: "deploy-letsencrypt-mailu.sh.j2" dest: "{{path_administrator_scripts}}mailu/deploy-letsencrypt-mailu.sh" -- name: configure deploy-letsencrypt-mailu.service +- name: configure deploy-letsencrypt-mailu.cymais.service template: src: "deploy-letsencrypt-mailu.service.j2" - dest: "/etc/systemd/system/deploy-letsencrypt-mailu.service" - notify: restart deploy-letsencrypt-mailu.service + dest: "/etc/systemd/system/deploy-letsencrypt-mailu.cymais.service" + notify: restart deploy-letsencrypt-mailu.cymais.service - name: "include role for systemd-timer for {{service_name}}" include_role: diff --git a/roles/docker-mailu/templates/deploy-letsencrypt-mailu.service.j2 b/roles/docker-mailu/templates/deploy-letsencrypt-mailu.service.j2 index cc2e823e..c5fc533f 100644 --- a/roles/docker-mailu/templates/deploy-letsencrypt-mailu.service.j2 +++ b/roles/docker-mailu/templates/deploy-letsencrypt-mailu.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=Let's Encrypt Mailu Deploy -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/driver-msi-keyboard-color/tasks/setup_timers.yml b/roles/driver-msi-keyboard-color/tasks/setup_timers.yml index 9db1d838..ed70b212 100644 --- a/roles/driver-msi-keyboard-color/tasks/setup_timers.yml +++ b/roles/driver-msi-keyboard-color/tasks/setup_timers.yml @@ -7,10 +7,10 @@ tags: - keyboard-color -- name: Copy keyboard-color.service file +- name: Copy keyboard-color.cymais.service file template: src: keyboard-color.service.j2 - dest: /etc/systemd/system/keyboard-color.service + dest: /etc/systemd/system/keyboard-color.cymais.service mode: 0644 tags: - keyboard-color diff --git a/roles/driver-msi-keyboard-color/templates/keyboard-color.service.j2 b/roles/driver-msi-keyboard-color/templates/keyboard-color.service.j2 index e603a143..72da815b 100644 --- a/roles/driver-msi-keyboard-color/templates/keyboard-color.service.j2 +++ b/roles/driver-msi-keyboard-color/templates/keyboard-color.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=Keyboard Color Service -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/heal-docker/files/heal-docker.py b/roles/heal-docker/files/heal-docker.py index 6fefab26..b11a0374 100644 --- a/roles/heal-docker/files/heal-docker.py +++ b/roles/heal-docker/files/heal-docker.py @@ -40,8 +40,8 @@ waiting_time=600 blocker_running=True while blocker_running: try: - bash("systemctl is-active --quiet backup-docker-to-local.service") - bash("systemctl is-active --quiet update-docker.service") + bash("systemctl is-active --quiet backup-docker-to-local.cymais.service") + bash("systemctl is-active --quiet update-docker.cymais.service") print("backup is running.") print("trying again in " + str(waiting_time) + " seconds.") time.sleep(waiting_time) diff --git a/roles/heal-docker/handlers/main.yml b/roles/heal-docker/handlers/main.yml index 023255c6..e3ebda0b 100644 --- a/roles/heal-docker/handlers/main.yml +++ b/roles/heal-docker/handlers/main.yml @@ -1,4 +1,4 @@ -- name: "reload heal-docker.service" +- name: "reload heal-docker.cymais.service" systemd: - name: heal-docker.service + name: heal-docker.cymais.service daemon_reload: yes diff --git a/roles/heal-docker/tasks/main.yml b/roles/heal-docker/tasks/main.yml index 48dad7ef..8a6cebae 100644 --- a/roles/heal-docker/tasks/main.yml +++ b/roles/heal-docker/tasks/main.yml @@ -11,11 +11,11 @@ dest: "{{heal_docker}}heal-docker.py" when: run_once_heal_docker is not defined -- name: create heal-docker.service +- name: create heal-docker.cymais.service template: src: heal-docker.service.j2 - dest: /etc/systemd/system/heal-docker.service - notify: reload heal-docker.service + dest: /etc/systemd/system/heal-docker.cymais.service + notify: reload heal-docker.cymais.service when: run_once_heal_docker is not defined - name: set service_name to the name of the current role diff --git a/roles/heal-docker/templates/heal-docker.service.j2 b/roles/heal-docker/templates/heal-docker.service.j2 index 4c2340ff..784191c7 100644 --- a/roles/heal-docker/templates/heal-docker.service.j2 +++ b/roles/heal-docker/templates/heal-docker.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=restart unhealthy docker containers -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/health-btrfs/handlers/main.yml b/roles/health-btrfs/handlers/main.yml index 6a2a7978..c92f58df 100644 --- a/roles/health-btrfs/handlers/main.yml +++ b/roles/health-btrfs/handlers/main.yml @@ -1,5 +1,5 @@ -- name: "reload health-btrfs.service" +- name: "reload health-btrfs.cymais.service" systemd: - name: health-btrfs.service + name: health-btrfs.cymais.service enabled: yes daemon_reload: yes \ No newline at end of file diff --git a/roles/health-btrfs/tasks/main.yml b/roles/health-btrfs/tasks/main.yml index 30eb8300..fceb1e68 100644 --- a/roles/health-btrfs/tasks/main.yml +++ b/roles/health-btrfs/tasks/main.yml @@ -9,11 +9,11 @@ src: health-btrfs.sh dest: "{{docker_health_btrfs_folder}}health-btrfs.sh" -- name: create health-btrfs.service +- name: create health-btrfs.cymais.service template: src: health-btrfs.service.j2 - dest: /etc/systemd/system/health-btrfs.service - notify: reload health-btrfs.service + dest: /etc/systemd/system/health-btrfs.cymais.service + notify: reload health-btrfs.cymais.service - name: set service_name to the name of the current role set_fact: diff --git a/roles/health-btrfs/templates/health-btrfs.service.j2 b/roles/health-btrfs/templates/health-btrfs.service.j2 index 155877ea..a2c7e33b 100644 --- a/roles/health-btrfs/templates/health-btrfs.service.j2 +++ b/roles/health-btrfs/templates/health-btrfs.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=Check btrfs status -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/health-disc-space/handlers/main.yml b/roles/health-disc-space/handlers/main.yml index 736936c7..c76c3278 100644 --- a/roles/health-disc-space/handlers/main.yml +++ b/roles/health-disc-space/handlers/main.yml @@ -1,5 +1,5 @@ -- name: "reload health-disc-space.service" +- name: "reload health-disc-space.cymais.service" systemd: - name: health-disc-space.service + name: health-disc-space.cymais.service enabled: yes daemon_reload: yes diff --git a/roles/health-disc-space/tasks/main.yml b/roles/health-disc-space/tasks/main.yml index 1cfb8dc1..9c5b0e20 100644 --- a/roles/health-disc-space/tasks/main.yml +++ b/roles/health-disc-space/tasks/main.yml @@ -9,11 +9,11 @@ src: health-disc-space.sh dest: "{{health_disc_space_folder}}health-disc-space.sh" -- name: create health-disc-space.service +- name: create health-disc-space.cymais.service template: src: health-disc-space.service.j2 - dest: /etc/systemd/system/health-disc-space.service - notify: reload health-disc-space.service + dest: /etc/systemd/system/health-disc-space.cymais.service + notify: reload health-disc-space.cymais.service - name: set service_name to the name of the current role set_fact: diff --git a/roles/health-disc-space/templates/health-disc-space.service.j2 b/roles/health-disc-space/templates/health-disc-space.service.j2 index 78203057..aa916a69 100644 --- a/roles/health-disc-space/templates/health-disc-space.service.j2 +++ b/roles/health-disc-space/templates/health-disc-space.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=checking disc space -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/health-docker-container/README.md b/roles/health-docker-container/README.md index 75a61c75..0746b96b 100644 --- a/roles/health-docker-container/README.md +++ b/roles/health-docker-container/README.md @@ -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. diff --git a/roles/health-docker-container/handlers/main.yml b/roles/health-docker-container/handlers/main.yml index 5ffe8f44..a4614393 100644 --- a/roles/health-docker-container/handlers/main.yml +++ b/roles/health-docker-container/handlers/main.yml @@ -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 diff --git a/roles/health-docker-container/tasks/main.yml b/roles/health-docker-container/tasks/main.yml index 4ced72e3..f4401da2 100644 --- a/roles/health-docker-container/tasks/main.yml +++ b/roles/health-docker-container/tasks/main.yml @@ -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 diff --git a/roles/health-docker-container/templates/health-docker-container.service.j2 b/roles/health-docker-container/templates/health-docker-container.service.j2 index 30dc4ec6..918e9954 100644 --- a/roles/health-docker-container/templates/health-docker-container.service.j2 +++ b/roles/health-docker-container/templates/health-docker-container.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=Checking docker health -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/health-docker-volumes/README.md b/roles/health-docker-volumes/README.md index 3f3cff27..bb29afdc 100644 --- a/roles/health-docker-volumes/README.md +++ b/roles/health-docker-volumes/README.md @@ -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. diff --git a/roles/health-docker-volumes/handlers/main.yml b/roles/health-docker-volumes/handlers/main.yml index 6b8f0542..4941c0a2 100644 --- a/roles/health-docker-volumes/handlers/main.yml +++ b/roles/health-docker-volumes/handlers/main.yml @@ -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 diff --git a/roles/health-docker-volumes/tasks/main.yml b/roles/health-docker-volumes/tasks/main.yml index 75049054..867c297a 100644 --- a/roles/health-docker-volumes/tasks/main.yml +++ b/roles/health-docker-volumes/tasks/main.yml @@ -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 diff --git a/roles/health-docker-volumes/templates/health-docker-volumes.service.j2 b/roles/health-docker-volumes/templates/health-docker-volumes.service.j2 index 2b3ff3b9..13997f9f 100644 --- a/roles/health-docker-volumes/templates/health-docker-volumes.service.j2 +++ b/roles/health-docker-volumes/templates/health-docker-volumes.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=Checking docker health -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/health-journalctl/handlers/main.yml b/roles/health-journalctl/handlers/main.yml index 05bc56ea..83fa7f0b 100644 --- a/roles/health-journalctl/handlers/main.yml +++ b/roles/health-journalctl/handlers/main.yml @@ -1,5 +1,5 @@ -- name: "reload health-journalctl.service" +- name: "reload health-journalctl.cymais.service" systemd: - name: health-journalctl.service + name: health-journalctl.cymais.service enabled: yes daemon_reload: yes diff --git a/roles/health-journalctl/tasks/main.yml b/roles/health-journalctl/tasks/main.yml index bce20c32..2bcb8a0a 100644 --- a/roles/health-journalctl/tasks/main.yml +++ b/roles/health-journalctl/tasks/main.yml @@ -11,11 +11,11 @@ dest: "{{health_journalctl_folder}}health-journalctl.sh" when: run_once_health_journalctl is not defined -- name: create health-journalctl.service +- name: create health-journalctl.cymais.service template: src: health-journalctl.service.j2 - dest: /etc/systemd/system/health-journalctl.service - notify: reload health-journalctl.service + dest: /etc/systemd/system/health-journalctl.cymais.service + notify: reload health-journalctl.cymais.service when: run_once_health_journalctl is not defined - name: set service_name to the name of the current role diff --git a/roles/health-journalctl/templates/health-journalctl.service.j2 b/roles/health-journalctl/templates/health-journalctl.service.j2 index c59e8706..315c0c92 100644 --- a/roles/health-journalctl/templates/health-journalctl.service.j2 +++ b/roles/health-journalctl/templates/health-journalctl.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=checking journalctl health -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/health-nginx/README.md b/roles/health-nginx/README.md index 217748d5..8ea0a9cd 100644 --- a/roles/health-nginx/README.md +++ b/roles/health-nginx/README.md @@ -26,11 +26,11 @@ This role depends on: ## Usage 1. **Installation of Python Modules**: The role installs the required Python `requests` module. 2. **File and Directory Management**: It creates the necessary directories and files, including the `health-nginx.py` script. -3. **Service and Timer Templates**: Templates for `health-nginx.service` and `health-nginx.timer` are set up to automate the health checks. +3. **Service and Timer Templates**: Templates for `health-nginx.cymais.service` and `health-nginx.timer` are set up to automate the health checks. 4. **Running the Health Check**: The `health-nginx.py` script is executed to perform the health check. It iterates over nginx configuration files and sends a HEAD request to each domain/subdomain to verify its status. The script considers different expected status codes based on the domain or subdomain. ## Handler Details -- **reload health-nginx.service**: Reloads the `health-nginx.service` if there are any changes to the service file. +- **reload health-nginx.cymais.service**: Reloads the `health-nginx.cymais.service` if there are any changes to the service file. - **restart health-nginx.timer**: Restarts and enables the `health-nginx.timer` to schedule regular health checks. ## Additional Information diff --git a/roles/health-nginx/handlers/main.yml b/roles/health-nginx/handlers/main.yml index 73e0a0d3..c553d5b1 100644 --- a/roles/health-nginx/handlers/main.yml +++ b/roles/health-nginx/handlers/main.yml @@ -1,5 +1,5 @@ -- name: "reload health-nginx.service" +- name: "reload health-nginx.cymais.service" systemd: - name: health-nginx.service + name: health-nginx.cymais.service enabled: yes daemon_reload: yes diff --git a/roles/health-nginx/tasks/main.yml b/roles/health-nginx/tasks/main.yml index 809f7c34..d1322d04 100644 --- a/roles/health-nginx/tasks/main.yml +++ b/roles/health-nginx/tasks/main.yml @@ -17,11 +17,11 @@ dest: "{{ health_nginx_folder }}health-nginx.py" when: run_once_health_nginx is not defined -- name: create health-nginx.service +- name: create health-nginx.cymais.service template: src: health-nginx.service.j2 - dest: /etc/systemd/system/health-nginx.service - notify: reload health-nginx.service + dest: /etc/systemd/system/health-nginx.cymais.service + notify: reload health-nginx.cymais.service when: run_once_health_nginx is not defined - name: set service_name to the name of the current role diff --git a/roles/health-nginx/templates/health-nginx.service.j2 b/roles/health-nginx/templates/health-nginx.service.j2 index e17335ed..d03e986d 100644 --- a/roles/health-nginx/templates/health-nginx.service.j2 +++ b/roles/health-nginx/templates/health-nginx.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=Check nginx configuration status -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/nginx-certbot/handlers/main.yml b/roles/nginx-certbot/handlers/main.yml index 928dd4b5..5cab9c81 100644 --- a/roles/nginx-certbot/handlers/main.yml +++ b/roles/nginx-certbot/handlers/main.yml @@ -1,6 +1,6 @@ - name: "reload certbot service" systemd: - name: nginx-certbot.service + name: nginx-certbot.cymais.service state: reloaded enabled: yes daemon_reload: yes diff --git a/roles/nginx-certbot/tasks/main.yml b/roles/nginx-certbot/tasks/main.yml index a2f1f592..c1ff679b 100644 --- a/roles/nginx-certbot/tasks/main.yml +++ b/roles/nginx-certbot/tasks/main.yml @@ -4,10 +4,10 @@ state: present when: run_once_nginx_certbot is not defined -- name: configure nginx-certbot.service +- name: configure nginx-certbot.cymais.service template: src: nginx-certbot.service.j2 - dest: /etc/systemd/system/nginx-certbot.service + dest: /etc/systemd/system/nginx-certbot.cymais.service notify: reload certbot service when: run_once_nginx_certbot is not defined diff --git a/roles/nginx-certbot/templates/nginx-certbot.service.j2 b/roles/nginx-certbot/templates/nginx-certbot.service.j2 index a9c46167..cfb8ded6 100644 --- a/roles/nginx-certbot/templates/nginx-certbot.service.j2 +++ b/roles/nginx-certbot/templates/nginx-certbot.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=Let's Encrypt renewal -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/systemd-notifier-email/handlers/main.yml b/roles/systemd-notifier-email/handlers/main.yml index a8763686..e2d5877e 100644 --- a/roles/systemd-notifier-email/handlers/main.yml +++ b/roles/systemd-notifier-email/handlers/main.yml @@ -1,4 +1,4 @@ - name: "restart systemd-notifier-email service" systemd: - name: systemd-notifier-email.service + name: systemd-notifier-email.cymais.service daemon_reload: yes diff --git a/roles/systemd-notifier-email/tasks/main.yml b/roles/systemd-notifier-email/tasks/main.yml index cec74cf3..5ddd0054 100644 --- a/roles/systemd-notifier-email/tasks/main.yml +++ b/roles/systemd-notifier-email/tasks/main.yml @@ -3,7 +3,9 @@ when: run_once_systemd_notifier_email is not defined - name: configure msmtprc.conf.j2 - template: src=msmtprc.conf.j2 dest=/root/.msmtprc + template: + src: "msmtprc.conf.j2" + dest: "/root/.msmtprc" when: run_once_systemd_notifier_email is not defined - name: "create {{systemd_notifier_email_folder}}" @@ -14,11 +16,15 @@ when: run_once_systemd_notifier_email is not defined - name: configure systemd-notifier-email.sh - template: src=systemd-notifier-email.sh.j2 dest={{systemd_notifier_email_folder}}systemd-notifier-email.sh + template: + src: systemd-notifier-email.sh.j2 + dest: "{{systemd_notifier_email_folder}}systemd-notifier-email.sh" when: run_once_systemd_notifier_email is not defined -- name: configure systemd-notifier-email.service - template: src=systemd-notifier-email@.service.j2 dest=/etc/systemd/system/systemd-notifier-email@.service +- name: configure systemd-notifier-email.cymais.service + template: + src: systemd-notifier-email@.service.j2 + dest: /etc/systemd/system/systemd-notifier-email.cymais@.service notify: restart systemd-notifier-email service when: run_once_systemd_notifier_email is not defined diff --git a/roles/systemd-notifier-telegram/handlers/main.yml b/roles/systemd-notifier-telegram/handlers/main.yml index e0271c96..ee539150 100644 --- a/roles/systemd-notifier-telegram/handlers/main.yml +++ b/roles/systemd-notifier-telegram/handlers/main.yml @@ -1,4 +1,4 @@ - name: "restart systemd-notifier-telegram service" systemd: - name: systemd-notifier-telegram.service + name: systemd-notifier-telegram.cymais.service daemon_reload: yes diff --git a/roles/systemd-notifier-telegram/tasks/main.yml b/roles/systemd-notifier-telegram/tasks/main.yml index f449588e..103f48d6 100644 --- a/roles/systemd-notifier-telegram/tasks/main.yml +++ b/roles/systemd-notifier-telegram/tasks/main.yml @@ -17,10 +17,10 @@ dest: "{{ systemd_telegram_script }}" when: run_once_systemd_notifier_telegram is not defined -- name: configure systemd-notifier-telegram.service +- name: configure systemd-notifier-telegram.cymais.service template: src: systemd-notifier-telegram@.service.j2 - dest: "/etc/systemd/system/systemd-notifier-telegram@.service" + dest: "/etc/systemd/system/systemd-notifier-telegram.cymais@.service" notify: "restart systemd-notifier-telegram service" when: run_once_systemd_notifier_telegram is not defined diff --git a/roles/systemd-notifier/handlers/main.yml b/roles/systemd-notifier/handlers/main.yml index d68ba6d9..1a91fd71 100644 --- a/roles/systemd-notifier/handlers/main.yml +++ b/roles/systemd-notifier/handlers/main.yml @@ -1,6 +1,6 @@ - name: "restart systemd-notifier service" systemd: - name: systemd-notifier.service + name: systemd-notifier.cymais.service daemon_reload: yes when: run_once_systemd_notifier_service is not defined diff --git a/roles/systemd-notifier/tasks/main.yml b/roles/systemd-notifier/tasks/main.yml index acaf3e17..738990e8 100644 --- a/roles/systemd-notifier/tasks/main.yml +++ b/roles/systemd-notifier/tasks/main.yml @@ -1,8 +1,8 @@ --- -- name: configure systemd-notifier@.service +- name: configure systemd-notifier.cymais@.service template: src: systemd-notifier@.service.j2 - dest: "/etc/systemd/system/systemd-notifier@.service" + dest: "/etc/systemd/system/systemd-notifier.cymais@.service" notify: "restart systemd-notifier service" when: run_once_systemd_notifier_service is not defined diff --git a/roles/systemd-notifier/templates/systemd-notifier@.service.j2 b/roles/systemd-notifier/templates/systemd-notifier@.service.j2 index 8886a1cf..3390d5d3 100644 --- a/roles/systemd-notifier/templates/systemd-notifier@.service.j2 +++ b/roles/systemd-notifier/templates/systemd-notifier@.service.j2 @@ -3,6 +3,6 @@ Description=Notifier for %i [Service] Type=oneshot -ExecStart=/usr/bin/systemctl start systemd-notifier-telegram@%i.service systemd-notifier-email@%i.service +ExecStart=/usr/bin/systemctl start systemd-notifier-telegram.cymais@%i.service systemd-notifier-email.cymais@%i.service User=root Group=systemd-journal diff --git a/roles/systemd-timer/templates/dummy.timer.j2 b/roles/systemd-timer/templates/dummy.timer.j2 index 187dc783..18e4bbd2 100644 --- a/roles/systemd-timer/templates/dummy.timer.j2 +++ b/roles/systemd-timer/templates/dummy.timer.j2 @@ -1,5 +1,5 @@ [Unit] -Description=Timer to start {{service_name}}.service +Description=Timer to start {{service_name}}.cymais.service [Timer] OnCalendar={{on_calendar}} diff --git a/roles/update-docker/tasks/main.yml b/roles/update-docker/tasks/main.yml index 932a7aa1..a30c310f 100644 --- a/roles/update-docker/tasks/main.yml +++ b/roles/update-docker/tasks/main.yml @@ -1,6 +1,6 @@ -- name: "start backup-docker-to-local-everything.service" +- name: "start backup-docker-to-local-everything.cymais.service" systemd: - name: backup-docker-to-local-everything.service + name: backup-docker-to-local-everything.cymais.service state: started when: mode_backup | bool @@ -9,14 +9,14 @@ src: update-docker.py dest: "{{update_docker_script}}" -- name: configure update-docker.service +- name: configure update-docker.cymais.service template: src: update-docker.service.j2 - dest: /etc/systemd/system/update-docker.service + dest: /etc/systemd/system/update-docker.cymais.service -- name: "reload update-docker.service" +- name: "reload update-docker.cymais.service" systemd: - name: update-docker.service + name: update-docker.cymais.service state: reloaded enabled: yes daemon_reload: yes \ No newline at end of file diff --git a/roles/update-docker/templates/update-docker.service.j2 b/roles/update-docker/templates/update-docker.service.j2 index 7f1638a7..9935691b 100644 --- a/roles/update-docker/templates/update-docker.service.j2 +++ b/roles/update-docker/templates/update-docker.service.j2 @@ -1,6 +1,6 @@ [Unit] Description=Updates Docker Instances -OnFailure=systemd-notifier@%n.service +OnFailure=systemd-notifier.cymais@%n.service [Service] Type=oneshot diff --git a/roles/wireguard/README.md b/roles/wireguard/README.md index 029c4bac..e9c1f353 100644 --- a/roles/wireguard/README.md +++ b/roles/wireguard/README.md @@ -19,12 +19,12 @@ Manages wireguard on host. ### Activate Configuration ```bash cp /path/to/wg0.conf /etc/wireguard/wg0.conf - systemctl enable wg-quick@wg0.service --now + systemctl enable wg-quick@wg0.cymais.service --now ``` ### Check status ```bash - systemctl status wg-quick@wg0.service + systemctl status wg-quick@wg0.cymais.service ``` ## See diff --git a/roles/wireguard/handlers/main.yml b/roles/wireguard/handlers/main.yml index 8dfccf37..af3c3f0b 100644 --- a/roles/wireguard/handlers/main.yml +++ b/roles/wireguard/handlers/main.yml @@ -1,6 +1,6 @@ - name: "restart wireguard" systemd: - name: wg-quick@wg0.service + name: wg-quick.cymais@wg0.service state: restarted enabled: yes daemon_reload: yes