Skip to content

Commit

Permalink
split handlers per instance
Browse files Browse the repository at this point in the history
roles with two or more instances need handlers for each instance

Signed-off-by: Sergio Nemirowski <[email protected]>
  • Loading branch information
Sergio Nemirowski committed Mar 30, 2022
1 parent a2c5678 commit 6f1430c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

- name: Restart NeoGo service
- name: 'Restart NeoGo{{ neogo__instance }} service'
ansible.builtin.systemd:
name: "neogo{{ neogo__instance }}.service"
state: 'restarted'
Expand Down
2 changes: 1 addition & 1 deletion tasks/binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
group: 'root'
mode: '0755'
when: not (neogo__use_compose | bool)
notify: [ 'Restart NeoGo service' ]
notify: [ 'Restart NeoGo{{ neogo__instance }} service' ]
8 changes: 4 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tasks/tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
group: "{{ neogo__group }}"
mode: '0640'
when: neogo__tls_enabled | bool
notify: [ 'Restart NeoGo service' ]
notify: [ 'Restart NeoGo{{ neogo__instance }} service' ]
2 changes: 1 addition & 1 deletion tasks/wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]

0 comments on commit 6f1430c

Please sign in to comment.