refactor ♻️: Refactor legacy and minified proxmoxlib.js patching logic to use handlers #2

Merged
Jose merged 7 commits from dev into main 2026-02-08 08:06:27 +01:00
Showing only changes of commit f16d6a62b7 - Show all commits

View File

@@ -39,13 +39,20 @@
- patch_legacy.matched == 0
notify: restart pveproxy
- name: subscription | proxmoxlib.js after patch
ansible.builtin.stat:
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
checksum_algorithm: sha256
register: proxmoxlib_js_after
when: patch_legacy is changed
- name: subscription | Store patched checksum (legacy)
ansible.builtin.copy:
dest: /var/lib/proxmox-nag-patch/proxmoxlib.js.sha256
owner: root
group: root
mode: "0644"
content: "{{ proxmoxlib_js.stat.checksum }}\n"
content: "{{ proxmoxlib_js_after.stat.checksum }}\n"
when:
- proxmoxlib_js.stat.exists
- patch_legacy is changed
@@ -83,6 +90,13 @@
- patch_minified.matched == 0
notify: restart pveproxy
- name: subscription | Re-stat proxmoxlib.min.js after patch
ansible.builtin.stat:
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.min.js
checksum_algorithm: sha256
register: proxmoxlib_min_js_after
when: patch_legacy is changed
- name: subscription | Store patched checksum (minified)
ansible.builtin.copy:
dest: /var/lib/proxmox-nag-patch/proxmoxlib.min.js.sha256
@@ -91,5 +105,5 @@
mode: "0644"
content: "{{ proxmoxlib_min_js.stat.checksum }}\n"
when:
- proxmoxlib_min_js.stat.exists
- proxmoxlib_min_js_after.stat.exists
- patch_minified is changed