28 lines
728 B
YAML
28 lines
728 B
YAML
---
|
|
|
|
- name: Import talos_machine_status tasks
|
|
ansible.builtin.import_tasks: "{{ role_path }}/../../shared/tasks/talos_machine_status.yml"
|
|
|
|
- name: Reboot Talos
|
|
delegate_to: "{{ talosctl_host }}"
|
|
become: false
|
|
throttle: 1
|
|
ansible.builtin.command:
|
|
cmd: >-
|
|
talosctl reboot
|
|
--wait=true
|
|
--endpoints '{{ ansible_host }}'
|
|
--nodes '{{ ansible_host }}'
|
|
{% if talos_machine_status.spec.stage == 'maintenance' %} --insecure{% endif %}
|
|
changed_when: true
|
|
environment:
|
|
TALOSCONFIG: "{{ talosconfig }}"
|
|
|
|
- name: Wait for Talos port 50000
|
|
delegate_to: "{{ talosctl_host }}"
|
|
become: false
|
|
throttle: 1
|
|
ansible.builtin.wait_for:
|
|
host: "{{ ansible_host }}"
|
|
port: 50000
|