ansible-role-k3s/tasks/state_installed.yml
davidg cfd9400edf
Containerd registries config not live (#222)
I found a bug where my custom containerd registries config wasn't live,
despite the correct `notify` handlers being specified in the
'Ensure containerd registries file exists' task.

This change fixes that by ensuring the handlers get triggered.
2024-01-26 15:08:18 -05:00

49 lines
1.6 KiB
YAML

---
- name: Ensure nodes are drained and removed
ansible.builtin.import_tasks: ensure_drain_and_remove_nodes.yml
- name: Determine systemd context
ansible.builtin.import_tasks: determine_systemd_context.yml
- name: Flush Handlers
ansible.builtin.meta: flush_handlers
- name: Run k3s binary download and install tasks
ansible.builtin.import_tasks: ensure_downloads.yml
when: not k3s_airgap
- name: Run k3s binary upload tasks | k3s_airgap
ansible.builtin.import_tasks: ensure_uploads.yml
when: k3s_airgap
- name: Run auto-deploy manifests and pod manifests tasks
ansible.builtin.import_tasks: ensure_k3s_auto_deploy.yml
- name: Ensure k3s configuration files are copied to controllers and agents
ansible.builtin.import_tasks: ensure_k3s_config_files.yml
- name: Run k3s installation tasks
ansible.builtin.import_tasks: ensure_installed.yml
- name: Ensure containerd registries
ansible.builtin.include_tasks: ensure_containerd_registries.yml
when:
- (k3s_registries.mirrors | default(None)) != None or (k3s_registries.configs | default(None) != None)
- ('rootless' not in k3s_runtime_config or not k3s_runtime_config.rootless)
- name: Run cluster pre-checks
ansible.builtin.include_tasks: pre_checks_cluster.yml
when:
- k3s_control_delegate is defined
- k3s_control_delegate == inventory_hostname
- name: Run k3s cluster tasks
ansible.builtin.import_tasks: ensure_cluster.yml
when:
- k3s_build_cluster is defined
- k3s_build_cluster
- k3s_registration_address is defined
- name: Flush Handlers
ansible.builtin.meta: flush_handlers