refactor ♻️: Refactor Proxmox playbook to use ansible.builtin.expect with ignore_errors

Updated the `proxmox.yml` file to include the use of `ansible.builtin.expect` module and set `ignore_errors` to handle exceptions gracefully.
This commit is contained in:
2025-12-16 21:00:08 +01:00
parent d7726852ea
commit 651bf323df

View File

@@ -38,7 +38,7 @@
pve_mod_gui_sensors_installed: null pve_mod_gui_sensors_installed: null
- name: Run pve-mod-gui-sensors script with predefined answers - name: Run pve-mod-gui-sensors script with predefined answers
expect: ansible.builtin.expect:
command: bash /tmp/pve-mod-gui-sensors.sh install command: bash /tmp/pve-mod-gui-sensors.sh install
responses: responses:
'Display temperatures for all cores \[C\] or average per CPU \[a\].*\(C/a\):.*': 'a' 'Display temperatures for all cores \[C\] or average per CPU \[a\].*\(C/a\):.*': 'a'
@@ -46,6 +46,7 @@
'Enable UPS information\?.*\(y/N\):.*': 'n' 'Enable UPS information\?.*\(y/N\):.*': 'n'
'Enable system information\?.*\(1/2/n\):.*': '2' 'Enable system information\?.*\(1/2/n\):.*': '2'
register: pve_mod_gui_sensors_installed register: pve_mod_gui_sensors_installed
ignore_errors: true
- name: Wait for Proxmox Web GUI to be up - name: Wait for Proxmox Web GUI to be up
wait_for: wait_for: