49 lines
504 B
Plaintext
49 lines
504 B
Plaintext
|
{% 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
|