2026-02-07 08:29:45 +01:00
|
|
|
---
|
2026-02-07 18:32:40 +01:00
|
|
|
- name: subscription | Ensure nag patch state directory exists
|
|
|
|
|
ansible.builtin.file:
|
|
|
|
|
path: /var/lib/proxmox-nag-patch
|
|
|
|
|
state: directory
|
|
|
|
|
owner: root
|
|
|
|
|
group: root
|
|
|
|
|
mode: "0755"
|
|
|
|
|
|
|
|
|
|
############################
|
|
|
|
|
# Legacy proxmoxlib.js
|
|
|
|
|
############################
|
|
|
|
|
|
2026-02-07 09:24:46 +01:00
|
|
|
- name: subscription | Check for legacy proxmoxlib.js
|
2026-02-07 09:27:07 +01:00
|
|
|
ansible.builtin.stat:
|
2026-02-07 09:24:46 +01:00
|
|
|
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
|
2026-02-07 18:32:40 +01:00
|
|
|
checksum_algorithm: sha256
|
2026-02-07 09:24:46 +01:00
|
|
|
register: proxmoxlib_js
|
|
|
|
|
|
2026-02-08 07:07:23 +01:00
|
|
|
- name: subscription | Read stored checksum (legacy)
|
|
|
|
|
ansible.builtin.slurp:
|
|
|
|
|
src: /var/lib/proxmox-nag-patch/proxmoxlib.js.sha256
|
|
|
|
|
register: proxmoxlib_js_checksum_stored
|
|
|
|
|
when: proxmoxlib_js.stat.exists
|
|
|
|
|
failed_when: false
|
2026-02-07 18:54:32 +01:00
|
|
|
|
2026-02-08 07:12:21 +01:00
|
|
|
- name: subscription | Trigger legacy nag patch if needed
|
|
|
|
|
ansible.builtin.meta: flush_handlers
|
2026-02-07 18:32:40 +01:00
|
|
|
when:
|
|
|
|
|
- proxmoxlib_js.stat.exists
|
2026-02-08 07:07:23 +01:00
|
|
|
- proxmoxlib_js_checksum_stored.content is not defined
|
|
|
|
|
or proxmoxlib_js.stat.checksum
|
|
|
|
|
!= (proxmoxlib_js_checksum_stored.content | b64decode | trim)
|
2026-02-08 07:12:21 +01:00
|
|
|
notify: Ppatch legacy proxmoxlib.js
|
2026-02-07 18:32:40 +01:00
|
|
|
|
|
|
|
|
############################
|
|
|
|
|
# Minified proxmoxlib.min.js (VE 8/9)
|
|
|
|
|
############################
|
|
|
|
|
|
2026-02-07 09:24:46 +01:00
|
|
|
- name: subscription | Check for minified proxmoxlib.min.js (VE 8/9)
|
2026-02-07 09:27:07 +01:00
|
|
|
ansible.builtin.stat:
|
2026-02-07 09:24:46 +01:00
|
|
|
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.min.js
|
2026-02-07 18:32:40 +01:00
|
|
|
checksum_algorithm: sha256
|
2026-02-07 09:24:46 +01:00
|
|
|
register: proxmoxlib_min_js
|
|
|
|
|
|
2026-02-07 18:32:40 +01:00
|
|
|
- name: subscription | Read stored checksum (minified)
|
|
|
|
|
ansible.builtin.slurp:
|
|
|
|
|
src: /var/lib/proxmox-nag-patch/proxmoxlib.min.js.sha256
|
|
|
|
|
register: proxmoxlib_min_checksum_stored
|
|
|
|
|
when: proxmoxlib_min_js.stat.exists
|
|
|
|
|
failed_when: false
|
|
|
|
|
|
2026-02-08 07:12:21 +01:00
|
|
|
- name: subscription | Trigger minified nag patch if needed
|
|
|
|
|
ansible.builtin.meta: flush_handlers
|
2026-02-07 18:34:05 +01:00
|
|
|
when:
|
2026-02-07 18:32:40 +01:00
|
|
|
- proxmoxlib_min_js.stat.exists
|
|
|
|
|
- proxmoxlib_min_checksum_stored.content is not defined
|
2026-02-08 07:07:23 +01:00
|
|
|
or proxmoxlib_min_js.stat.checksum
|
|
|
|
|
!= (proxmoxlib_min_checksum_stored.content | b64decode | trim)
|
2026-02-08 07:12:21 +01:00
|
|
|
notify: Patch minified proxmoxlib.js
|