2021-06-22 21:47:58 +02:00
|
|
|
---
|
|
|
|
|
2023-05-13 15:49:39 +02:00
|
|
|
- name: Ensure nodes are drained and removed
|
|
|
|
ansible.builtin.import_tasks: ensure_drain_and_remove_nodes.yml
|
2021-06-22 21:47:58 +02:00
|
|
|
|
2023-05-13 15:49:39 +02:00
|
|
|
- name: Determine systemd context
|
|
|
|
ansible.builtin.import_tasks: determine_systemd_context.yml
|
2021-06-22 21:47:58 +02:00
|
|
|
|
|
|
|
- name: Flush Handlers
|
2022-05-02 18:13:12 +02:00
|
|
|
ansible.builtin.meta: flush_handlers
|
2021-06-22 21:47:58 +02:00
|
|
|
|
2023-05-13 15:49:39 +02:00
|
|
|
- name: Run k3s binary download and install tasks
|
|
|
|
ansible.builtin.import_tasks: ensure_downloads.yml
|
2021-06-22 21:47:58 +02:00
|
|
|
when: not k3s_airgap
|
|
|
|
|
2023-05-13 15:49:39 +02:00
|
|
|
- name: Run k3s binary upload tasks | k3s_airgap
|
|
|
|
ansible.builtin.import_tasks: ensure_uploads.yml
|
2021-06-22 21:47:58 +02:00
|
|
|
when: k3s_airgap
|
|
|
|
|
2023-05-13 15:49:39 +02:00
|
|
|
- name: Run auto-deploy manifests and pod manifests tasks
|
|
|
|
ansible.builtin.import_tasks: ensure_k3s_auto_deploy.yml
|
2021-06-22 21:47:58 +02:00
|
|
|
|
2023-05-13 15:49:39 +02:00
|
|
|
- name: Ensure k3s configuration files are copied to controllers and agents
|
|
|
|
ansible.builtin.import_tasks: ensure_k3s_config_files.yml
|
2021-06-22 21:47:58 +02:00
|
|
|
|
2023-05-13 15:49:39 +02:00
|
|
|
- name: Run k3s installation tasks
|
|
|
|
ansible.builtin.import_tasks: ensure_installed.yml
|
2021-06-22 21:47:58 +02:00
|
|
|
|
2023-05-13 15:49:39 +02:00
|
|
|
- name: Ensure containerd registries
|
|
|
|
ansible.builtin.include_tasks: ensure_containerd_registries.yml
|
2021-06-22 21:47:58 +02:00
|
|
|
when:
|
2023-06-01 14:34:17 +02:00
|
|
|
- (k3s_registries.mirrors | default(None)) != None or (k3s_registries.configs | default(None) != None)
|
2021-06-22 21:47:58 +02:00
|
|
|
- ('rootless' not in k3s_runtime_config or not k3s_runtime_config.rootless)
|
|
|
|
|
2023-05-13 15:49:39 +02:00
|
|
|
- name: Run cluster pre-checks
|
|
|
|
ansible.builtin.include_tasks: pre_checks_cluster.yml
|
2021-06-22 21:47:58 +02:00
|
|
|
when:
|
|
|
|
- k3s_control_delegate is defined
|
|
|
|
- k3s_control_delegate == inventory_hostname
|
|
|
|
|
2023-05-13 15:49:39 +02:00
|
|
|
- name: Run k3s cluster tasks
|
|
|
|
ansible.builtin.import_tasks: ensure_cluster.yml
|
2021-06-22 21:47:58 +02:00
|
|
|
when:
|
|
|
|
- k3s_build_cluster is defined
|
|
|
|
- k3s_build_cluster
|
|
|
|
- k3s_registration_address is defined
|