Skip to content
Commits on Source (2)
DPkg::Post-Invoke {"/usr/local/lib/pve-no-subscription-patcher";};
#!/usr/bin/env bash
SFILE=/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
cat "${SFILE}" | grep -i -A 5 "void({ //Ext.Msg.show" | grep -qi "'No valid sub" && exit 0
logger -t pve-no-subscription-patcher -s "Patching Proxmox widget toolkit"
cp -f "${SFILE}" "/root/$(basename ${SFILE}).bak"
sed -Ezi "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" "${SFILE}"
systemctl restart pveproxy.service
- name: Apply no subscription patch
shell: /usr/local/lib/pve-no-subscription-patcher
---
# Update packages list
- name: Update packages list
apt:
update_cache: yes
galaxy_info:
author: Dmitriy Safronov <zimniy@cyberbrain.pw>
description: Proxmox VE - enable `no subscription' repo, disable no subscription warning
description: Proxmox VE - enable 'no subscription' repo, disable 'enterprise' repo
# company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the
......@@ -53,8 +53,6 @@ galaxy_info:
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies:
- role: essential
# []
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
---
# Delete "enterprise" repo
- name: Delete "enterprise" repo
apt_repository:
repo: deb https://enterprise.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-enterprise
state: absent
filename: pve-enterprise
notify: Update packages list
# Add "no subscription" repo
- name: Add "no subscription" repo
apt_repository:
repo: deb [arch=amd64] http://download.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-no-subscription
state: present
filename: pve-no-subscription
# Put apt hook
- name: Copy apt hook
copy:
src: etc/apt/apt.conf.d/99pve-no-subscription-patcher
dest: /etc/apt/apt.conf.d/99pve-no-subscription-patcher
owner: root
group: root
mode: 0644
notify: Apply no subscription patch
# Put patcher script
- name: Copy patcher script
copy:
src: usr/local/lib/pve-no-subscription-patcher
dest: /usr/local/lib/pve-no-subscription-patcher
owner: root
group: root
mode: 0755
notify: Apply no subscription patch
# Update packages list
- name: Update packages list
apt:
update_cache: yes
notify: Update packages list