2016-12-13 00:21:56 +08:00
|
|
|
|
|
|
|
{% 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 %}
|
|
|
|
|
2021-03-24 08:26:05 +08:00
|
|
|
[kube_control_plane]
|
2016-12-13 00:21:56 +08:00
|
|
|
{% for vm in vm_list %}
|
2021-03-24 08:26:05 +08:00
|
|
|
{% if 'kube_control_plane' in vm.tags.roles %}
|
2016-12-13 00:21:56 +08:00
|
|
|
{{ vm.name }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
[etcd]
|
|
|
|
{% for vm in vm_list %}
|
|
|
|
{% if 'etcd' in vm.tags.roles %}
|
|
|
|
{{ vm.name }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
2021-04-29 20:20:50 +08:00
|
|
|
[kube_node]
|
2016-12-13 00:21:56 +08:00
|
|
|
{% for vm in vm_list %}
|
2021-04-29 20:20:50 +08:00
|
|
|
{% if 'kube_node' in vm.tags.roles %}
|
2016-12-13 00:21:56 +08:00
|
|
|
{{ vm.name }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
2021-04-29 20:20:50 +08:00
|
|
|
[k8s_cluster:children]
|
|
|
|
kube_node
|
2021-03-24 08:26:05 +08:00
|
|
|
kube_control_plane
|