2017-02-20 23:51:48 +08:00
|
|
|
{% for instance in droplets.results %}
|
2017-02-22 21:27:30 +08:00
|
|
|
{{instance.droplet.name}} ansible_ssh_host={{instance.droplet.ip_address}}
|
2017-02-20 23:51:48 +08:00
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% if mode is defined and mode == "separate" %}
|
|
|
|
[kube-master]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[0].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
|
|
|
|
[kube-node]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[1].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
|
|
|
|
[etcd]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[2].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
|
|
|
|
[vault]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[2].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
{% elif mode is defined and mode == "ha" %}
|
|
|
|
[kube-master]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[0].droplet.name}}
|
|
|
|
{{droplets.results[1].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
|
|
|
|
[kube-node]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[2].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
|
|
|
|
[etcd]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[1].droplet.name}}
|
|
|
|
{{droplets.results[2].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
|
|
|
|
[vault]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[1].droplet.name}}
|
|
|
|
{{droplets.results[2].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
{% else %}
|
|
|
|
[kube-master]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[0].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
|
|
|
|
[kube-node]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[1].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
|
|
|
|
[etcd]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[0].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
|
|
|
|
[vault]
|
2017-02-22 21:27:30 +08:00
|
|
|
{{droplets.results[0].droplet.name}}
|
2017-02-20 23:51:48 +08:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
[k8s-cluster:children]
|
|
|
|
kube-node
|
|
|
|
kube-master
|