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.

39 lines
1.2 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: Define groups for legacy less structured inventories
  8. hosts: all
  9. gather_facts: false
  10. tags: always
  11. tasks:
  12. - name: Match needed groups by their old names or definition
  13. vars:
  14. group_mappings:
  15. kube_control_plane:
  16. - kube-master
  17. kube_node:
  18. - kube-node
  19. calico_rr:
  20. - calico-rr
  21. no_floating:
  22. - no-floating
  23. k8s_cluster:
  24. - kube_node
  25. - kube_control_plane
  26. - calico_rr
  27. group_by:
  28. key: "{{ (group_names | intersect(item.value) | length > 0) | ternary(item.key, '_all') }}"
  29. loop: "{{ group_mappings | dict2items }}"
  30. - name: Install bastion ssh config
  31. hosts: bastion[0]
  32. gather_facts: false
  33. environment: "{{ proxy_disable_env }}"
  34. roles:
  35. - { role: kubespray-defaults }
  36. - { role: bastion-ssh-config, tags: ["localhost", "bastion"] }