34 lines
848 B
Plaintext
34 lines
848 B
Plaintext
|
|
||
|
{% for vm in vm_list %}
|
||
|
{% if not use_bastion or vm.name == 'bastion' %}
|
||
|
{{ vm.name }} ansible_ssh_host={{ vm.networkProfile.networkInterfaces[0].expanded.ipConfigurations[0].publicIPAddress.expanded.ipAddress }} ip={{ vm.networkProfile.networkInterfaces[0].expanded.ipConfigurations[0].privateIPAddress }}
|
||
|
{% else %}
|
||
|
{{ vm.name }} ansible_ssh_host={{ vm.networkProfile.networkInterfaces[0].expanded.ipConfigurations[0].privateIPAddress }}
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
|
||
|
[kube-master]
|
||
|
{% for vm in vm_list %}
|
||
|
{% if 'kube-master' in vm.tags.roles %}
|
||
|
{{ vm.name }}
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
|
||
|
[etcd]
|
||
|
{% for vm in vm_list %}
|
||
|
{% if 'etcd' in vm.tags.roles %}
|
||
|
{{ vm.name }}
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
|
||
|
[kube-node]
|
||
|
{% for vm in vm_list %}
|
||
|
{% if 'kube-node' in vm.tags.roles %}
|
||
|
{{ vm.name }}
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
|
||
|
[k8s-cluster:children]
|
||
|
kube-node
|
||
|
kube-master
|