snel.kubernetes-cluster/roles/talos_upgrade_k8s/tasks/main.yml

22 lines
498 B
YAML

---
- name: Upgrade Kubernetes to {{ kubernetes_version }}
delegate_to: "{{ talosctl_host }}"
run_once: true
ansible.builtin.command:
cmd: >-
talosctl upgrade-k8s
--to={{ kubernetes_version }}
changed_when: true
environment:
TALOSCONFIG: "{{ talosconfig }}"
- name: Wait for Talos port 50000
delegate_to: "{{ talosctl_host }}"
throttle: 1
become: false
ansible.builtin.wait_for:
host: "{{ ansible_host }}"
port: 50000
delay: 5
timeout: 300