main.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ---
  2. # Configure and start joystream-node RPC service on the servers
  3. - name: Print bootNodes
  4. debug:
  5. var: result.result.bootNodes
  6. run_once: true
  7. - name: Create a service file
  8. template:
  9. src: joystream-node.service.j2
  10. dest: /etc/systemd/system/joystream-node.service
  11. vars:
  12. template_remote_chain_spec_path: "{{ remote_chain_spec_path }}"
  13. boot_nodes: "{{ result.result.bootNodes }}"
  14. become: yes
  15. - name: Start service joystream-node, if not started
  16. service:
  17. name: joystream-node
  18. state: started
  19. become: yes
  20. - name: Set websocket and http endpoint variables
  21. set_fact:
  22. ws_rpc: "{{ inventory_hostname }}.nip.io/ws-rpc"
  23. http_rpc: "{{ inventory_hostname }}.nip.io/http-rpc"
  24. run_once: yes
  25. - name: Install and configure Caddy
  26. include_role:
  27. name: caddy_ansible.caddy_ansible
  28. apply:
  29. become: yes
  30. vars:
  31. caddy_config: "{{ lookup('template', 'templates/Caddyfile.j2') }}"
  32. caddy_systemd_capabilities_enabled: true
  33. caddy_update: false
  34. - name: Print RPC node DNS
  35. debug:
  36. msg: "RPC Endpoint: wss://{{ ws_rpc }}"