34 lines
1017 B
YAML
34 lines
1017 B
YAML
---
|
|
|
|
- name: Sleep a bit because we just called the 'Finish' operation at DCI Manager
|
|
when: dci_finish_called is defined
|
|
ansible.builtin.pause:
|
|
prompt: Please wait
|
|
seconds: 30
|
|
|
|
- name: Call DCI Manager API to reinstall Talos Linux
|
|
delegate_to: "{{ dci_manager_access_host }}"
|
|
become: false
|
|
ansible.builtin.uri:
|
|
url: "{{ dci_manager_protocol }}://{{ dci_manager_host }}:{{ dci_manager_port }}/dci/v3/server/{{ dci_server_info.id }}/operation_os"
|
|
method: POST
|
|
return_content: true
|
|
headers:
|
|
Accept: application/json
|
|
X-Xsrf-Token: "{{ dci_token }}"
|
|
body_format: json
|
|
body:
|
|
hdd_raid: "no_raid"
|
|
os_template_id: "{{ dci_manager_talos_os_template_id }}"
|
|
password: "_not_used_"
|
|
register: _dci_reinstall
|
|
until: _dci_reinstall.status != 503 and _dci_reinstall.status != -1
|
|
|
|
- name: Wait for Talos port 50000
|
|
delegate_to: "{{ talosctl_host }}"
|
|
become: false
|
|
ansible.builtin.wait_for:
|
|
delay: 10
|
|
host: "{{ ansible_remote }}"
|
|
port: 50000
|