You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
848 B

  1. {% for vm in vm_list %}
  2. {% if not use_bastion or vm.name == 'bastion' %}
  3. {{ vm.name }} ansible_ssh_host={{ vm.networkProfile.networkInterfaces[0].expanded.ipConfigurations[0].publicIPAddress.expanded.ipAddress }} ip={{ vm.networkProfile.networkInterfaces[0].expanded.ipConfigurations[0].privateIPAddress }}
  4. {% else %}
  5. {{ vm.name }} ansible_ssh_host={{ vm.networkProfile.networkInterfaces[0].expanded.ipConfigurations[0].privateIPAddress }}
  6. {% endif %}
  7. {% endfor %}
  8. [kube-master]
  9. {% for vm in vm_list %}
  10. {% if 'kube-master' in vm.tags.roles %}
  11. {{ vm.name }}
  12. {% endif %}
  13. {% endfor %}
  14. [etcd]
  15. {% for vm in vm_list %}
  16. {% if 'etcd' in vm.tags.roles %}
  17. {{ vm.name }}
  18. {% endif %}
  19. {% endfor %}
  20. [kube-node]
  21. {% for vm in vm_list %}
  22. {% if 'kube-node' in vm.tags.roles %}
  23. {{ vm.name }}
  24. {% endif %}
  25. {% endfor %}
  26. [k8s-cluster:children]
  27. kube-node
  28. kube-master