fix(runtime): migrate roles to nested system fields

This commit is contained in:
2026-02-11 05:37:18 +01:00
parent db08609acf
commit fcc7c6aeb6
23 changed files with 128 additions and 168 deletions

View File

@@ -1,8 +1,8 @@
---
- name: Cleanup physical install
when: install_type == "physical"
when: system_cfg.type == "physical"
ansible.builtin.include_tasks: physical.yml
- name: Cleanup virtual install
when: install_type == "virtual"
when: system_cfg.type == "virtual"
ansible.builtin.include_tasks: virtual.yml

View File

@@ -22,6 +22,6 @@
api_host: "{{ hypervisor_cfg.url }}"
api_user: "{{ hypervisor_cfg.username }}"
api_password: "{{ hypervisor_cfg.password }}"
node: "{{ hypervisor_cfg.node }}"
node: "{{ hypervisor_cfg.host }}"
vmid: "{{ system_cfg.id }}"
state: restarted

View File

@@ -28,7 +28,7 @@
(ansible_connection | default('ssh')) != 'ssh'
or ((system_cfg.ip | default('') | string | length) > 0)
or (
install_type == 'physical'
system_cfg.type == 'physical'
and (ansible_host | default('') | string | length) > 0
)
)
@@ -38,7 +38,7 @@
- name: Check VM accessibility after reboot
when:
- install_type == "virtual"
- system_cfg.type == "virtual"
- cleanup_post_reboot_can_connect | bool
block:
- name: Attempt to connect to VM
@@ -114,7 +114,7 @@
api_host: "{{ hypervisor_cfg.url }}"
api_user: "{{ hypervisor_cfg.username }}"
api_password: "{{ hypervisor_cfg.password }}"
node: "{{ hypervisor_cfg.node }}"
node: "{{ hypervisor_cfg.host }}"
name: "{{ hostname }}"
vmid: "{{ system_cfg.id }}"
state: stopped
@@ -129,7 +129,7 @@
api_host: "{{ hypervisor_cfg.url }}"
api_user: "{{ hypervisor_cfg.username }}"
api_password: "{{ hypervisor_cfg.password }}"
node: "{{ hypervisor_cfg.node }}"
node: "{{ hypervisor_cfg.host }}"
name: "{{ hostname }}"
vmid: "{{ system_cfg.id }}"
state: absent