distribute-validators: add --delete for rsyncing secrets
Also drop some debug messages, comment out ignore_errors. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
73bde9a51a
commit
a269c3e490
|
@ -14,17 +14,11 @@
|
||||||
that: '{{ (new_validators|intersect(new_secrets)|length) == (new_validators|length) }}'
|
that: '{{ (new_validators|intersect(new_secrets)|length) == (new_validators|length) }}'
|
||||||
fail_msg: 'List of validators and their secrets does not overlap!'
|
fail_msg: 'List of validators and their secrets does not overlap!'
|
||||||
|
|
||||||
- debug: var=new_validators[0:10]
|
|
||||||
- debug: var=old_validators[0:10]
|
|
||||||
|
|
||||||
- name: Check compare existing validators
|
- name: Check compare existing validators
|
||||||
set_fact:
|
set_fact:
|
||||||
secrets_diff: '{{ new_secrets|difference(old_secrets) }}'
|
secrets_diff: '{{ new_secrets|difference(old_secrets) }}'
|
||||||
validators_diff: '{{ new_validators|difference(old_validators) }}'
|
validators_diff: '{{ new_validators|difference(old_validators) }}'
|
||||||
|
|
||||||
- debug: var=secrets_diff[0:10]
|
|
||||||
- debug: var=validators_diff[0:10]
|
|
||||||
|
|
||||||
- name: Check if validators changed
|
- name: Check if validators changed
|
||||||
set_fact:
|
set_fact:
|
||||||
secrets_changed: '{{ secrets_diff|length > 0 }}'
|
secrets_changed: '{{ secrets_diff|length > 0 }}'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
command: docker-compose stop
|
command: docker-compose stop
|
||||||
args:
|
args:
|
||||||
chdir: '/docker/{{ dist_validators_cont_name }}'
|
chdir: '/docker/{{ dist_validators_cont_name }}'
|
||||||
ignore_errors: true
|
#ignore_errors: true
|
||||||
|
|
||||||
- name: Remove validators/secrets folders
|
- name: Remove validators/secrets folders
|
||||||
file:
|
file:
|
||||||
|
@ -33,8 +33,7 @@
|
||||||
|
|
||||||
- name: Copy over secrets
|
- name: Copy over secrets
|
||||||
command: |
|
command: |
|
||||||
rsync -ru \
|
rsync -ru --delete {{ new_secrets | join(" ") }} '{{ dist_validators_data_path }}/secrets/'
|
||||||
{{ new_secrets | join(" ") }} '{{ dist_validators_data_path }}/secrets/'
|
|
||||||
args:
|
args:
|
||||||
chdir: '{{ dist_validators_secrets_path }}'
|
chdir: '{{ dist_validators_secrets_path }}'
|
||||||
|
|
||||||
|
@ -58,4 +57,4 @@
|
||||||
command: docker-compose start
|
command: docker-compose start
|
||||||
args:
|
args:
|
||||||
chdir: '/docker/{{ dist_validators_cont_name }}'
|
chdir: '/docker/{{ dist_validators_cont_name }}'
|
||||||
ignore_errors: true
|
#ignore_errors: true
|
||||||
|
|
Loading…
Reference in New Issue