main.yml 951 B

1234567891011121314151617181920212223242526272829303132
  1. ---
  2. # Configure admin server to be able to create chain-spec file and subkey commands
  3. - name: Copy bash_profile content
  4. shell: cat ~/.bash_profile
  5. register: bash_data
  6. - name: Copy bash_profile content to bashrc for non-interactive sessions
  7. blockinfile:
  8. block: '{{ bash_data.stdout }}'
  9. path: ~/.bashrc
  10. insertbefore: BOF
  11. - name: Get dependencies for subkey
  12. shell: curl https://getsubstrate.io -sSf | bash -s -- --fast
  13. - name: Install subkey
  14. shell: cargo install --force subkey --git https://github.com/paritytech/substrate --version 2.0.1 --locked
  15. # Run in async fashion for max duration of 1 hr
  16. async: 3600
  17. poll: 0
  18. register: install_result
  19. - name: Check whether install subkey task has finished
  20. async_status:
  21. jid: '{{ install_result.ansible_job_id }}'
  22. register: job_result
  23. until: job_result.finished
  24. # Max number of times to check for status
  25. retries: 36
  26. # Check for the status every 100s
  27. delay: 100