main.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ---
  2. # Configure chain spec and start joystream-node service on the servers
  3. - name: Run subkey to generate node keys
  4. local_action: command {{ local_dir }}/target/release/chain-spec-builder generate -a 2 --chain-spec-path {{ change_spec_path }} --deployment live --endowed 1 --keystore-path {{ data_path }}
  5. register: chain_spec_output
  6. run_once: true
  7. - name: Run subkey to generate node keys
  8. local_action: command subkey generate-node-key
  9. register: subkey_output
  10. - name: Print to stdout
  11. debug:
  12. msg:
  13. - "Public Key: {{ subkey_output.stderr }}"
  14. - "Private Key: {{ subkey_output.stdout }}"
  15. - name: Print to stdout chain spec
  16. debug: var=chain_spec_output.stdout
  17. run_once: true
  18. - name: Save output of chain spec to local file
  19. local_action: copy content={{ chain_spec_output.stdout }} dest="{{ data_path }}/chain_spec_output.txt"
  20. - name: Change chain spec name, id, protocolId
  21. delegate_to: localhost
  22. json_modify:
  23. change_spec_path: "{{ change_spec_path }}"
  24. prefix: "{{ network_suffix }}"
  25. all_nodes: "{{ hostvars }}"
  26. register: result
  27. run_once: true
  28. - name: Print output of modified chainspec
  29. debug:
  30. var: result.result
  31. run_once: true
  32. - name: Copying chain spec file to server
  33. copy:
  34. src: "{{ change_spec_path }}"
  35. dest: "{{ remote_chain_spec_path }}"