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.

63 lines
1.0 KiB

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