diff --git a/meta/main.yml b/meta/main.yml index 3762bfc..f20fffb 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -13,3 +13,6 @@ galaxy_info: - name: systemd-timer src: git+git@github.com:status-im/infra-role-systemd-timer.git scm: git + - name: infra-role-dist-validators + src: git+git@github.com:status-im/infra-role-dist-validators.git + scm: git diff --git a/tasks/main.yml b/tasks/main.yml index 90b30b6..8ac610f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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 diff --git a/tasks/validators.yml b/tasks/validators.yml new file mode 100644 index 0000000..ff9edd3 --- /dev/null +++ b/tasks/validators.yml @@ -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'