You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3 KiB

  1. ---
  2. - name: set basecoin configuration folder
  3. file: "path={{basecoin_home}}/.basecoin state=directory mode=0700 owner={{basecoin_user}} group={{basecoin_group}}"
  4. - name: generate basecoin keys
  5. when: basecoin_inprocess|bool
  6. shell: "tendermint gen_validator > {{basecoin_home}}/.basecoin/priv_validator.json && chmod 0400 {{basecoin_home}}/.basecoin/priv_validator.json"
  7. args:
  8. warn: no
  9. creates: "{{basecoin_home}}/.basecoin/priv_validator.json"
  10. become: yes
  11. become_user: "{{basecoin_user}}"
  12. - name: gather basecoin public keys
  13. when: basecoin_inprocess|bool
  14. command: "jq '.pub_key | .data' {{basecoin_home}}/.basecoin/priv_validator.json"
  15. become: yes
  16. become_user: "{{basecoin_user}}"
  17. register: basecoinpubkeys
  18. changed_when: false
  19. - name: register basecoin public keys as host facts
  20. when: basecoin_inprocess|bool
  21. set_fact: "pubkey={{basecoinpubkeys.stdout_lines[0]}}"
  22. connection: local
  23. - name: copy basecoin genesis.json - genesis_time will be updated
  24. template:
  25. src: genesis-basecoin.json.j2
  26. dest: "{{basecoin_home}}/.basecoin/genesis.json"
  27. become: yes
  28. become_user: "{{basecoin_user}}"
  29. - name: copy basecoin config.toml
  30. when: basecoin_inprocess|bool
  31. template:
  32. src: config.toml.j2
  33. dest: "{{basecoin_home}}/.basecoin/config.toml"
  34. become: yes
  35. become_user: "{{basecoin_user}}"