diff --git a/ansible/nimbus.yml b/ansible/nimbus.yml index e6a11b1..4ece1af 100644 --- a/ansible/nimbus.yml +++ b/ansible/nimbus.yml @@ -43,7 +43,7 @@ beacon_node_cont_tag: 'toledo' dist_validators_layout: "toledo-01.aws-eu-central-1a.nimbus.test": { start: 0, end: 1024 } - "toledo-02.aws-eu-central-1a.nimbus.test": { start: 1024, end: 2047 } + "toledo-02.aws-eu-central-1a.nimbus.test": { start: 1024, end: 2048 } roles: - { role: distribute-validators, tags: [ distribute-validators ] } - { role: infra-role-beacon-node, tags: [ infra-role-beacon-node, beacon-node ] } diff --git a/ansible/roles/distribute-validators/defaults/main.yml b/ansible/roles/distribute-validators/defaults/main.yml index c8c1fa1..daf9702 100644 --- a/ansible/roles/distribute-validators/defaults/main.yml +++ b/ansible/roles/distribute-validators/defaults/main.yml @@ -6,8 +6,8 @@ dist_validators_repo_path: '/home/{{ dist_validators_repo_user }}/distribute-val dist_validators_data_path: ~ dist_validators_name: ~ -dist_validators_layout: -# - { hostname: 'node-01', start: 0, end: 1023 } -# - { hostname: 'node-01', start: 1024, end: 2047 } -# +dist_validators_layout: {} +# 'node-01': { start: 0, end: 1023 } +# 'node-01': { start: 1024, end: 2047 } + dist_validators_range: '{{ dist_validators_layout[hostname] }}' diff --git a/ansible/roles/distribute-validators/tasks/main.yml b/ansible/roles/distribute-validators/tasks/main.yml index bbc35c6..e41c575 100644 --- a/ansible/roles/distribute-validators/tasks/main.yml +++ b/ansible/roles/distribute-validators/tasks/main.yml @@ -27,8 +27,8 @@ - name: Extract file paths set_fact: - found_validators: '{{ found_validators_raw.files | map(attribute="path") | list }}' - found_secrets: '{{ found_secrets_raw.files | map(attribute="path") | list }}' + found_validators: '{{ found_validators_raw.files | map(attribute="path") | list | sort }}' + found_secrets: '{{ found_secrets_raw.files | map(attribute="path") | list | sort }}' - name: Verify number of validators and secrets matches assert: @@ -47,7 +47,7 @@ - name: Copy over validators command: | - rsync -ru \ + rsync -ru --delete --exclude="slashing_protection.sqlite3*" \ {{ found_validators[dist_validators_range["start"]:dist_validators_range["end"]] | join(" ") }} \ '{{ dist_validators_data_path }}/validators/'