Files
esh-pfi-infrastructure/playbooks/pve-nag-patch.yaml
T

30 lines
1.1 KiB
YAML

# Remove the Proxmox "No valid subscription" popup on a PVE host and keep it removed across updates.
# scripts/elway infra-ops@<pve host> --playbook playbooks/pve-nag-patch.yaml
# Source + rationale: services/pve-nag-patch/. UI-only (one static JS file); no service restart.
steps:
- name: patch script
sudo: true
upload:
src: services/pve-nag-patch/pve-nag-patch
dest: /usr/local/sbin/pve-nag-patch
mode: "0755"
- name: apt hook (re-apply after every dpkg run)
sudo: true
upload:
src: services/pve-nag-patch/86pve-nag-patch
dest: /etc/apt/apt.conf.d/86pve-nag-patch
mode: "0644"
- name: apply now
sudo: true
shell: /usr/local/sbin/pve-nag-patch
when: "! grep -q pve-nag-patch /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js"
verify:
- name: the file on disk carries the patch
sudo: true
shell: grep -q 'false /\* pve-nag-patch \*/' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
changed_when: "false"
- name: pveproxy serves the patched file
shell: curl -sk https://127.0.0.1:8006/proxmoxlib.js | grep -q 'pve-nag-patch'
changed_when: "false"