From 6f1430c3c37515ba8579c73aff3815b6443a2935 Mon Sep 17 00:00:00 2001 From: Sergio Nemirowski Date: Thu, 31 Mar 2022 02:23:24 +0300 Subject: [PATCH] split handlers per instance roles with two or more instances need handlers for each instance Signed-off-by: Sergio Nemirowski --- handlers/main.yml | 2 +- tasks/binary.yml | 2 +- tasks/main.yml | 8 ++++---- tasks/tls.yml | 2 +- tasks/wallet.yml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index 3e3172b..01edf09 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,6 +1,6 @@ --- -- name: Restart NeoGo service +- name: 'Restart NeoGo{{ neogo__instance }} service' ansible.builtin.systemd: name: "neogo{{ neogo__instance }}.service" state: 'restarted' diff --git a/tasks/binary.yml b/tasks/binary.yml index c95b990..1d8476d 100644 --- a/tasks/binary.yml +++ b/tasks/binary.yml @@ -9,4 +9,4 @@ group: 'root' mode: '0755' when: not (neogo__use_compose | bool) - notify: [ 'Restart NeoGo service' ] + notify: [ 'Restart NeoGo{{ neogo__instance }} service' ] diff --git a/tasks/main.yml b/tasks/main.yml index cbc0758..5216e09 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -31,7 +31,7 @@ owner: 'root' group: '{{ neogo__group }}' mode: '0640' - notify: [ 'Restart NeoGo service' ] + notify: [ 'Restart NeoGo{{ neogo__instance }} service' ] - name: Copy compose file ansible.builtin.template: @@ -41,21 +41,21 @@ group: "{{ neogo__group }}" mode: '0640' when: neogo__use_compose | bool - notify: [ 'Restart NeoGo service' ] + notify: [ 'Restart NeoGo{{ neogo__instance }} service' ] - name: Copy regular systemd unit ansible.builtin.template: src: "neogo-legacy.service.bin.j2" dest: "/etc/systemd/system/neogo{{ neogo__instance }}.service" when: not (neogo__use_compose | bool) - notify: [ 'Restart NeoGo service' ] + notify: [ 'Restart NeoGo{{ neogo__instance }} service' ] - name: Copy dockerized systemd unit ansible.builtin.template: src: "neogo-legacy.service.compose.j2" dest: "/etc/systemd/system/neogo{{ neogo__instance }}.service" when: neogo__use_compose | bool - notify: [ 'Restart NeoGo service' ] + notify: [ 'Restart NeoGo{{ neogo__instance }} service' ] - name: Force debops.ferm run ansible.builtin.include_role: diff --git a/tasks/tls.yml b/tasks/tls.yml index 7db970c..e3d6cf5 100644 --- a/tasks/tls.yml +++ b/tasks/tls.yml @@ -15,4 +15,4 @@ group: "{{ neogo__group }}" mode: '0640' when: neogo__tls_enabled | bool - notify: [ 'Restart NeoGo service' ] + notify: [ 'Restart NeoGo{{ neogo__instance }} service' ] diff --git a/tasks/wallet.yml b/tasks/wallet.yml index 0557f57..56ea208 100644 --- a/tasks/wallet.yml +++ b/tasks/wallet.yml @@ -10,4 +10,4 @@ when: > (neogo__wallet_content is defined) and (neogo__wallet_content|length > 0) - notify: [ 'Restart NeoGo service' ] + notify: [ 'Restart NeoGo{{ neogo__instance }} service' ]