diff --git a/docs/run-first-validator.md b/docs/run-first-validator.md index 2c72419..2652aac 100644 --- a/docs/run-first-validator.md +++ b/docs/run-first-validator.md @@ -251,12 +251,6 @@ - Note the pubkey logged at start for comparing later with validator pubkey on chain -- Remove the `priv_validator_key.json` file from TMKMS machine as it is no longer required: - - ```bash - rm -rf - ``` - ### Start node - Run the following steps in the machine where the mainnet node is setup (machine 2) @@ -264,7 +258,7 @@ - Remove the validator key from node deployment as it is no longer required: ```bash - rm $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/data/laconicd-data/config/priv_validator_key.json + rm -rf $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/data/laconicd-data/config/priv_validator_key.json ``` NOTE: Store it safely offline in case of an emergency diff --git a/docs/run-validator.md b/docs/run-validator.md index fcc9d97..01f319b 100644 --- a/docs/run-validator.md +++ b/docs/run-validator.md @@ -178,12 +178,6 @@ - Note the pubkey logged at start for comparing later with validator pubkey on chain -- Remove the `priv_validator_key.json` file from TMKMS machine as it is no longer required: - - ```bash - rm -rf - ``` - ### Start Node - Run the following steps in the machine where the validator node is setup (machine 2) diff --git a/playbooks/tmkms/run-tmkms.yml b/playbooks/tmkms/run-tmkms.yml index c761c00..fbd3052 100644 --- a/playbooks/tmkms/run-tmkms.yml +++ b/playbooks/tmkms/run-tmkms.yml @@ -45,3 +45,9 @@ - name: Start tmkms deployment shell: | laconic-so deployment --dir {{data_directory}}/{{ tmkms_deployment_dir }} start + + - name: Remove input private validator key file + file: + path: "{{ priv_validator_key_file_path }}" + state: absent + when: priv_key_file.stat.exists