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.

60 lines
1.5 KiB

  1. ---
  2. - name: Check ansible version
  3. import_playbook: ansible_version.yml
  4. # These are inventory compatibility tasks with two purposes:
  5. # - to ensure we keep compatibility with old style group names
  6. # - to reduce inventory boilerplate (defining parent groups / empty groups)
  7. - name: Add kube-master nodes to kube_control_plane
  8. hosts: kube-master
  9. gather_facts: false
  10. tags: always
  11. tasks:
  12. - name: Add nodes to kube_control_plane group
  13. group_by:
  14. key: 'kube_control_plane'
  15. - name: Add kube-node nodes to kube_node
  16. hosts: kube-node
  17. gather_facts: false
  18. tags: always
  19. tasks:
  20. - name: Add nodes to kube_node group
  21. group_by:
  22. key: 'kube_node'
  23. - name: Add calico-rr nodes to calico_rr
  24. hosts: calico-rr
  25. gather_facts: false
  26. tags: always
  27. tasks:
  28. - name: Add nodes to calico_rr group
  29. group_by:
  30. key: 'calico_rr'
  31. - name: Define k8s_cluster group
  32. hosts: kube_node:kube_control_plane:calico_rr
  33. gather_facts: false
  34. tags: always
  35. tasks:
  36. - name: Add nodes to k8s_cluster group
  37. group_by:
  38. key: 'k8s_cluster'
  39. - name: Add no-floating nodes to no_floating
  40. hosts: no-floating
  41. gather_facts: false
  42. tags: always
  43. tasks:
  44. - name: Add nodes to no-floating group
  45. group_by:
  46. key: 'no_floating'
  47. - name: Install bastion ssh config
  48. hosts: bastion[0]
  49. gather_facts: false
  50. environment: "{{ proxy_disable_env }}"
  51. roles:
  52. - { role: kubespray-defaults }
  53. - { role: bastion-ssh-config, tags: ["localhost", "bastion"] }