2017-07-19 09:00:27 +00:00
|
|
|
|
2018-10-11 02:28:39 +00:00
|
|
|
{% for vm in vm_ip_list %}
|
2018-03-26 05:00:02 +00:00
|
|
|
{% if not use_bastion or vm.virtualMachine.name == 'bastion' %}
|
2017-07-19 09:00:27 +00:00
|
|
|
{{ vm.virtualMachine.name }} ansible_ssh_host={{ vm.virtualMachine.network.publicIpAddresses[0].ipAddress }} ip={{ vm.virtualMachine.network.privateIpAddresses[0] }}
|
|
|
|
{% else %}
|
|
|
|
{{ vm.virtualMachine.name }} ansible_ssh_host={{ vm.virtualMachine.network.privateIpAddresses[0] }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
2021-03-24 00:26:05 +00:00
|
|
|
[kube_control_plane]
|
2017-07-19 09:00:27 +00:00
|
|
|
{% for vm in vm_roles_list %}
|
2021-03-24 00:26:05 +00:00
|
|
|
{% if 'kube_control_plane' in vm.tags.roles %}
|
2017-07-19 09:00:27 +00:00
|
|
|
{{ vm.name }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
[etcd]
|
|
|
|
{% for vm in vm_roles_list %}
|
|
|
|
{% if 'etcd' in vm.tags.roles %}
|
|
|
|
{{ vm.name }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
[kube-node]
|
|
|
|
{% for vm in vm_roles_list %}
|
|
|
|
{% if 'kube-node' in vm.tags.roles %}
|
|
|
|
{{ vm.name }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
[k8s-cluster:children]
|
|
|
|
kube-node
|
2021-03-24 00:26:05 +00:00
|
|
|
kube_control_plane
|
2017-07-19 09:00:27 +00:00
|
|
|
|