From 6470af9bfd6fc6feb9def8b911651cf464f7ad50 Mon Sep 17 00:00:00 2001 From: Vezpi Date: Tue, 15 Sep 2026 21:35:53 +0000 Subject: [PATCH] add: patch Proxmox nag --- ansible/proxmox/update_proxmox.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ansible/proxmox/update_proxmox.yml b/ansible/proxmox/update_proxmox.yml index 8d5205f..127fc49 100644 --- a/ansible/proxmox/update_proxmox.yml +++ b/ansible/proxmox/update_proxmox.yml @@ -103,7 +103,24 @@ upgrade: full autoremove: true autoclean: true - + + - name: Check whether Proxmox subscription nag is already patched + ansible.builtin.shell: + cmd: > + grep -Fq + 'return (typeof orig_cmd === "function" && (orig_cmd(), true));' + /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js + register: proxmox_nag_patch + changed_when: false + failed_when: false + + - name: Patch Proxmox subscription nag + ansible.builtin.lineinfile: + path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js + insertafter: 'checked_command: function (orig_cmd) {' + line: ' return (typeof orig_cmd === "function" && (orig_cmd(), true));' + when: proxmox_nag_patch.rc != 0 + - name: Disable Ceph rebalancing ansible.builtin.command: ceph osd set noout