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.

86 lines
1.3 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. [broken_kube-master]
  35. {{node2}}
  36. [etcd]
  37. {{node2}}
  38. {{node3}}
  39. {% elif mode == "default" %}
  40. [kube-master]
  41. {{node1}}
  42. [kube-node]
  43. {{node2}}
  44. [etcd]
  45. {{node1}}
  46. [vault]
  47. {{node1}}
  48. {% elif mode == "aio" %}
  49. [kube-master]
  50. {{node1}}
  51. [kube-node]
  52. {{node1}}
  53. [etcd]
  54. {{node1}}
  55. [vault]
  56. {{node1}}
  57. {% endif %}
  58. [k8s-cluster:children]
  59. kube-node
  60. kube-master
  61. calico-rr
  62. [calico-rr]
  63. {% if mode is defined and mode in ["scale", "separate-scale", "ha-scale"] %}
  64. [fake_hosts]
  65. fake_scale_host[1:200]
  66. [kube-node:children]
  67. fake_hosts
  68. {% endif %}