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.

49 lines
1.6 KiB

  1. ---
  2. - hosts: localhost
  3. gather_facts: False
  4. become: no
  5. tasks:
  6. - name: "Check ansible version >=2.7.8"
  7. assert:
  8. msg: "Ansible must be v2.7.8 or higher"
  9. that:
  10. - ansible_version.string is version("2.7.8", ">=")
  11. tags:
  12. - check
  13. vars:
  14. ansible_connection: local
  15. - hosts: bastion[0]
  16. gather_facts: False
  17. roles:
  18. - { role: kubespray-defaults}
  19. - { role: bastion-ssh-config, tags: ["localhost", "bastion"]}
  20. - name: Bootstrap any new workers
  21. hosts: kube-node
  22. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  23. gather_facts: false
  24. roles:
  25. - { role: kubespray-defaults}
  26. - { role: bootstrap-os, tags: bootstrap-os}
  27. - name: Generate the etcd certificates beforehand
  28. hosts: etcd
  29. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  30. roles:
  31. - { role: kubespray-defaults}
  32. - { role: etcd, tags: etcd, etcd_cluster_setup: false }
  33. - name: Target only workers to get kubelet installed and checking in on any new nodes
  34. hosts: kube-node
  35. any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  36. roles:
  37. - { role: kubespray-defaults}
  38. - { role: kubernetes/preinstall, tags: preinstall }
  39. - { role: container-engine, tags: "container-engine", when: deploy_container_engine|default(true) }
  40. - { role: download, tags: download, when: "not skip_downloads" }
  41. - { role: etcd, tags: etcd, etcd_cluster_setup: false }
  42. - { role: kubernetes/node, tags: node }
  43. - { role: kubernetes/kubeadm, tags: kubeadm }
  44. - { role: network_plugin, tags: network }
  45. environment: "{{ proxy_env }}"