site.yml 821 B

12345678910111213141516171819202122232425262728293031323334353637
  1. ---
  2. - name: Base server setup (all hosts)
  3. hosts: all
  4. roles:
  5. - base
  6. - geoblock
  7. - name: Deploy Shadowsocks on relay server
  8. hosts: relay
  9. roles:
  10. - shadowsocks
  11. - name: Deploy Trojan on landing server
  12. hosts: landing
  13. roles:
  14. - trojan
  15. - name: Generate Surge client configuration
  16. hosts: localhost
  17. connection: local
  18. gather_facts: no
  19. tasks:
  20. - name: Create output directory
  21. ansible.builtin.file:
  22. path: output
  23. state: directory
  24. mode: "0755"
  25. - name: Render Surge client config
  26. ansible.builtin.template:
  27. src: templates/surge-client.conf.j2
  28. dest: output/surge-client.conf
  29. mode: "0600"
  30. - name: Display Surge config location
  31. ansible.builtin.debug:
  32. msg: "Surge client config generated at: output/surge-client.conf"