c12s-kubespray/tests/templates/inventory-do.j2
Cristian Calin 360aff4a57
Rename ansible groups to use _ instead of - (#7552)
* rename ansible groups to use _ instead of -

k8s-cluster -> k8s_cluster
k8s-node -> k8s_node
calico-rr -> calico_rr
no-floating -> no_floating

Note: kube-node,k8s-cluster groups in upgrade CI
      need clean-up after v2.16 is tagged

* ensure old groups are mapped to the new ones
2021-04-29 05:20:50 -07:00

47 lines
970 B
Django/Jinja

{% for instance in droplets.results %}
{{instance.droplet.name}} ansible_ssh_host={{instance.droplet.ip_address}}
{% endfor %}
{% if mode is defined and mode == "separate" %}
[kube_control_plane]
{{droplets.results[0].droplet.name}}
[kube_node]
{{droplets.results[1].droplet.name}}
[etcd]
{{droplets.results[2].droplet.name}}
{% elif mode is defined and mode == "ha" %}
[kube_control_plane]
{{droplets.results[0].droplet.name}}
{{droplets.results[1].droplet.name}}
[kube_node]
{{droplets.results[2].droplet.name}}
[etcd]
{{droplets.results[1].droplet.name}}
{{droplets.results[2].droplet.name}}
[broken_kube_control_plane]
{{droplets.results[1].droplet.name}}
[broken_etcd]
{{droplets.results[2].droplet.name}}
{% else %}
[kube_control_plane]
{{droplets.results[0].droplet.name}}
[kube_node]
{{droplets.results[1].droplet.name}}
[etcd]
{{droplets.results[0].droplet.name}}
{% endif %}
[calico_rr]
[k8s_cluster:children]
kube_node
kube_control_plane
calico_rr