kubespray/tests/templates/inventory-do.j2

49 lines
504 B
Plaintext
Raw Normal View History

2017-02-20 23:51:48 +08:00
{% for instance in droplets.results %}
node{{loop.index}} ansible_ssh_host={{instance.droplet.ip_address}}
{% endfor %}
{% if mode is defined and mode == "separate" %}
[kube-master]
node1
[kube-node]
node2
[etcd]
node3
[vault]
node3
{% elif mode is defined and mode == "ha" %}
[kube-master]
node1
node2
[kube-node]
node3
[etcd]
node2
node3
[vault]
node2
node3
{% else %}
[kube-master]
node1
[kube-node]
node2
[etcd]
node1
[vault]
node1
{% endif %}
[k8s-cluster:children]
kube-node
kube-master