Files
ansible_role_proxmox_provision/tasks/subscription.yml
Jose 75cff9590d
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 16s
Gitleaks Scan / gitleaks (push) Successful in 4s
Markdown Lint / markdown-lint (push) Successful in 5s
feat : Add new script pve-remove-nag.sh for removing Nag messages in PVE UIs
This commit introduces a new script `pve-remove-nag.sh` designed to remove nag messages from both the Proxmox VE web and mobile user interfaces. The script is refactored to improve installation process, and the UI patching logic has been temporarily commented out for further refinement.
2026-02-09 18:12:13 +01:00

50 lines
1.4 KiB
YAML

---
- name: Ensure /usr/local/bin exists
ansible.builtin.file:
path: /usr/local/bin
state: directory
owner: root
group: root
mode: "0755"
- name: subscription | Check for legacy proxmoxlib.js
ansible.builtin.stat:
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
register: proxmoxlib_js
- name: subscription | Install pve-remove-nag script
ansible.builtin.copy:
src: pve-remove-nag.sh
dest: /usr/local/bin/pve-remove-nag.sh
owner: root
group: root
mode: "0755"
when: proxmoxlib_js.stat.exists
- name: Install APT post-invoke hook for nag removal
ansible.builtin.copy:
dest: /etc/apt/apt.conf.d/no-nag-script
owner: root
group: root
mode: "0644"
content: |
DPkg::Post-Invoke { "/usr/local/bin/pve-remove-nag.sh"; };
############################
# Legacy proxmoxlib.js
############################
- name: subscription | Check for legacy proxmoxlib.js
ansible.builtin.stat:
path: /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
register: proxmoxlib_js
- name: subscription | Trigger legacy nag patch if needed
ansible.builtin.meta: flush_handlers
when:
- proxmoxlib_js.stat.exists
- proxmoxlib_js_checksum_stored.content is not defined
or proxmoxlib_js.stat.checksum
!= (proxmoxlib_js_checksum_stored.content | b64decode | trim)
notify: Ppatch legacy proxmoxlib.js