kubespray/tests/templates/inventory-do.j2

52 lines
999 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-master]
{{droplets.results[0].droplet.name}}
[kube-node]
{{droplets.results[1].droplet.name}}
[etcd]
{{droplets.results[2].droplet.name}}
[vault]
{{droplets.results[2].droplet.name}}
{% elif mode is defined and mode == "ha" %}
[kube-master]
{{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}}
[vault]
{{droplets.results[1].droplet.name}}
{{droplets.results[2].droplet.name}}
{% else %}
[kube-master]
{{droplets.results[0].droplet.name}}
[kube-node]
{{droplets.results[1].droplet.name}}
[etcd]
{{droplets.results[0].droplet.name}}
[vault]
{{droplets.results[0].droplet.name}}
{% endif %}
[calico-rr]
[k8s-cluster:children]
kube-node
kube-master
calico-rr