dist-validators: don't run any tasks if no layout is defined

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-01-18 19:47:14 +01:00
parent 89dfe7ca5c
commit 0bc722ca21
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 8 additions and 2 deletions

View File

@ -10,7 +10,7 @@ dist_validators_name: ~
dist_validators_path: '{{ dist_validators_repo_path }}/{{ dist_validators_name | mandatory }}/validators'
dist_validators_secrets_path: '{{ dist_validators_repo_path }}/{{ dist_validators_name | mandatory }}/secrets'
dist_validators_layout: {}
#dist_validators_layout:
# 'node-01': { start: 0, end: 1023 }
# 'node-01': { start: 1024, end: 2047 }

View File

@ -1,8 +1,14 @@
---
- name: Find new and old validators
include_tasks: read.yml
when: dist_validators_layout is defined
- name: Verify if validators changed
include_tasks: check.yml
when: dist_validators_layout is defined
- name: Copy over validators and secrets
include_tasks: write.yml
when: secrets_changed or validators_changed
when: >
dist_validators_layout is defined and
(secrets_changed or validators_changed)