c12s-kubespray/tests/templates/inventory-do.j2
2018-02-12 17:38:32 +01:00

48 lines
976 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 %}
[k8s-cluster:children]
kube-node
kube-master