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.

61 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. {{node2}}
  26. {{node3}}
  27. [vault]
  28. {{node2}}
  29. {{node3}}
  30. {% else %}
  31. [kube-master]
  32. {{node1}}
  33. [kube-node]
  34. {{node2}}
  35. [etcd]
  36. {{node1}}
  37. [vault]
  38. {{node1}}
  39. {% endif %}
  40. [k8s-cluster:children]
  41. kube-node
  42. kube-master
  43. {% if mode is defined and mode in ["scale", "separate-scale", "ha-scale"] %}
  44. [fake_hosts]
  45. fake_scale_host[1:200]
  46. [kube-node:children]
  47. fake_hosts
  48. {% endif %}