Skip to content

Commit

Permalink
add task for deploying validators
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sokołowski <[email protected]>
  • Loading branch information
jakubgs committed Sep 22, 2022
1 parent d22e685 commit 1a049ec
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
3 changes: 3 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ galaxy_info:
- name: systemd-timer
src: [email protected]:status-im/infra-role-systemd-timer.git
scm: git
- name: infra-role-dist-validators
src: [email protected]:status-im/infra-role-dist-validators.git
scm: git
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
- include_tasks: config.yml
- include_tasks: build.yml
- include_tasks: service.yml
#- import_tasks: validators.yml
# when: validator_client_dist_validators_enabled
- import_tasks: validators.yml
when: validator_client_dist_validators_enabled
#- include_tasks: consul.yml
20 changes: 20 additions & 0 deletions tasks/validators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: 'Distribute validators and secrets'
include_role: name=infra-role-dist-validators
vars:
dist_validators_name: '{{ validator_client_dist_validators_name }}'
dist_validators_user: '{{ validator_client_user }}'
dist_validators_start: '{{ validator_client_dist_validators_start | mandatory }}'
dist_validators_end: '{{ validator_client_dist_validators_end | mandatory }}'
dist_validators_sec_path: '{{ validator_client_dist_validators_sec_path | mandatory }}'
dist_validators_val_path: '{{ validator_client_dist_validators_val_path | mandatory }}'

- when: dist_validators_deployed is defined
block:
- name: 'Show number of validators deployed'
debug: msg='Deployed {{ dist_validators_deployed }} validators'

- name: 'Restart validator client service'
service:
name: '{{ validator_client_service_name }}.service'
state: 'restarted'

0 comments on commit 1a049ec

Please sign in to comment.