fix 🐛: updates the checksum storage mechanism to ensure idempotency.
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 11s
Gitleaks Scan / gitleaks (push) Successful in 5s
Markdown Lint / markdown-lint (push) Successful in 6s

This commit addresses the issue by adding necessary checks to `proxmoxlib.js` and `proxmoxlib.min.js` after applying patches. Additionally, it updates the checksum storage mechanism to ensure integrity and consistency.
This commit is contained in:
2026-02-07 18:54:32 +01:00
parent e0831c473e
commit f16d6a62b7

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