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 %}
|
|
|
|
|
|
|
|
[kube-node]
|
|
|
|
{% for vm in vm_list %}
|
|
|
|
{% if 'kube-node' in vm.tags.roles %}
|
|
|
|
{{ vm.name }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
[k8s-cluster:children]
|
|
|
|
kube-node
|
2021-03-24 08:26:05 +08:00
|
|
|
kube_control_plane
|