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.

77 lines
1.2 KiB

  1. {% set node1 = gce.instance_data[0].name %}
  2. {{node1}} ansible_ssh_host={{gce.instance_data[0].public_ip}}
  3. {% if mode != "aio" %}
  4. {% set node2 = gce.instance_data[1].name %}
  5. {{node2}} ansible_ssh_host={{gce.instance_data[1].public_ip}}
  6. {% endif %}
  7. {% if mode is defined and mode in ["ha", "ha-scale", "separate", "separate-scale"] %}
  8. {% set node3 = gce.instance_data[2].name %}
  9. {{node3}} ansible_ssh_host={{gce.instance_data[2].public_ip}}
  10. {% endif %}
  11. {% if mode is defined and mode in ["separate", "separate-scale"] %}
  12. [kube-master]
  13. {{node1}}
  14. [kube-node]
  15. {{node2}}
  16. [etcd]
  17. {{node3}}
  18. [vault]
  19. {{node3}}
  20. {% elif mode is defined and mode in ["ha", "ha-scale"] %}
  21. [kube-master]
  22. {{node1}}
  23. {{node2}}
  24. [kube-node]
  25. {{node3}}
  26. [etcd]
  27. {{node1}}
  28. {{node2}}
  29. {{node3}}
  30. [vault]
  31. {{node1}}
  32. {{node2}}
  33. {{node3}}
  34. {% elif mode == "default" %}
  35. [kube-master]
  36. {{node1}}
  37. [kube-node]
  38. {{node2}}
  39. [etcd]
  40. {{node1}}
  41. [vault]
  42. {{node1}}
  43. {% elif mode == "aio" %}
  44. [kube-master]
  45. {{node1}}
  46. [kube-node]
  47. {{node1}}
  48. [etcd]
  49. {{node1}}
  50. [vault]
  51. {{node1}}
  52. {% endif %}
  53. [k8s-cluster:children]
  54. kube-node
  55. kube-master
  56. {% if mode is defined and mode in ["scale", "separate-scale", "ha-scale"] %}
  57. [fake_hosts]
  58. fake_scale_host[1:200]
  59. [kube-node:children]
  60. fake_hosts
  61. {% endif %}