|
1 | 1 | ---
|
| 2 | +- name: Celestia-node | Init notify list |
| 3 | + ansible.builtin.set_fact: |
| 4 | + service_list: [] |
| 5 | + |
| 6 | +- name: Celestia-node | Set vars (bootstrapper) |
| 7 | + when: chain_celestia_bootstrapper is defined and chain_celestia_bootstrapper | bool |
| 8 | + ansible.builtin.set_fact: |
| 9 | + service_bridge: Restart celestia-bootstrapper-{{ chain_celestia_chain_id }} |
| 10 | + |
| 11 | +- name: Celestia-node | Append bootstrapper to notify list |
| 12 | + when: chain_celestia_bootstrapper is defined and chain_celestia_bootstrapper | bool |
| 13 | + ansible.builtin.set_fact: |
| 14 | + service_list: "{{ service_list + [chain_celestia_bootstrapper] }}" |
| 15 | + |
| 16 | +- name: Celestia-node | Set vars (bridge) |
| 17 | + when: chain_celestia_bridge is defined and chain_celestia_bridge | bool |
| 18 | + ansible.builtin.set_fact: |
| 19 | + service_validator: Restart celestia-bridge-{{ chain_celestia_chain_id }} |
| 20 | + |
| 21 | +- name: Celestia-node | Append bridge to notify list |
| 22 | + when: chain_celestia_bridge is defined and chain_celestia_bridge | bool |
| 23 | + ansible.builtin.set_fact: |
| 24 | + service_list: "{{ service_list + [chain_celestia_bridge] }}" |
| 25 | + |
2 | 26 | - name: Celestia-node | Ensure celestia-node repository is present
|
3 | 27 | ansible.builtin.git:
|
4 | 28 | repo: https://github.com/celestiaorg/celestia-node.git
|
|
21 | 45 | become: true
|
22 | 46 | become_user: "{{ chain_celestia_user }}"
|
23 | 47 | changed_when: true
|
24 |
| - notify: Restart {{ service_name }} |
25 | 48 |
|
26 | 49 | - name: Celestia-node | Build
|
27 | 50 | when: repo_cloned.changed # noqa: no-handler
|
|
33 | 56 | args:
|
34 | 57 | executable: /bin/bash
|
35 | 58 | changed_when: true
|
| 59 | + notify: "{{ item }}" |
| 60 | + loop: "{{ service_list }}" |
36 | 61 |
|
37 | 62 | - name: Celestia-node | Copy binary to home folder
|
38 | 63 | when: repo_cloned.changed # noqa: no-handler
|
|
0 commit comments