c12s-kubespray/tests/templates/inventory-do.j2

58 lines
1.1 KiB
Text
Raw Normal View History

2017-02-20 15:51:48 +00:00
{% for instance in droplets.results %}
2017-02-22 13:27:30 +00:00
{{instance.droplet.name}} ansible_ssh_host={{instance.droplet.ip_address}}
2017-02-20 15:51:48 +00:00
{% endfor %}
{% if mode is defined and mode == "separate" %}
[kube_control_plane]
2017-02-22 13:27:30 +00:00
{{droplets.results[0].droplet.name}}
2017-02-20 15:51:48 +00:00
[kube-node]
2017-02-22 13:27:30 +00:00
{{droplets.results[1].droplet.name}}
2017-02-20 15:51:48 +00:00
[etcd]
2017-02-22 13:27:30 +00:00
{{droplets.results[2].droplet.name}}
2017-02-20 15:51:48 +00:00
[vault]
2017-02-22 13:27:30 +00:00
{{droplets.results[2].droplet.name}}
2017-02-20 15:51:48 +00:00
{% elif mode is defined and mode == "ha" %}
[kube_control_plane]
2017-02-22 13:27:30 +00:00
{{droplets.results[0].droplet.name}}
{{droplets.results[1].droplet.name}}
2017-02-20 15:51:48 +00:00
[kube-node]
2017-02-22 13:27:30 +00:00
{{droplets.results[2].droplet.name}}
2017-02-20 15:51:48 +00:00
[etcd]
2017-02-22 13:27:30 +00:00
{{droplets.results[1].droplet.name}}
{{droplets.results[2].droplet.name}}
2017-02-20 15:51:48 +00:00
[vault]
2017-02-22 13:27:30 +00:00
{{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}}
2017-02-20 15:51:48 +00:00
{% else %}
[kube_control_plane]
2017-02-22 13:27:30 +00:00
{{droplets.results[0].droplet.name}}
2017-02-20 15:51:48 +00:00
[kube-node]
2017-02-22 13:27:30 +00:00
{{droplets.results[1].droplet.name}}
2017-02-20 15:51:48 +00:00
[etcd]
2017-02-22 13:27:30 +00:00
{{droplets.results[0].droplet.name}}
2017-02-20 15:51:48 +00:00
[vault]
2017-02-22 13:27:30 +00:00
{{droplets.results[0].droplet.name}}
2017-02-20 15:51:48 +00:00
{% endif %}
[calico-rr]
2017-02-20 15:51:48 +00:00
[k8s-cluster:children]
kube-node
kube_control_plane
calico-rr