Skip to content
GitLab
Explore
Sign in
Tools
Ansible
Roles
Proxmox VE no subscription
Compare revisions
3f951c735c5c026bf8cc2190d4bf74a1083e9025 to 8e2e22a3cf5a57b06df5ea954677e90f0280317d
Commits on Source (2)
fx
· f826e64b
Дмитрий Сафронов
authored
Dec 02, 2021
f826e64b
Merge branch 'fix' into 'master'
· 8e2e22a3
Дмитрий Сафронов
authored
Dec 02, 2021
fx See merge request ansible/roles/proxmox_ve_no_subscription!11
8e2e22a3
Hide whitespace changes
Inline
Side-by-side
files/etc/apt/apt.conf.d/99pve-no-subscription-patcher
deleted
100644 → 0
View file @
3f951c73
DPkg::Post-Invoke {"/usr/local/lib/pve-no-subscription-patcher";};
files/usr/local/lib/pve-no-subscription-patcher
deleted
100644 → 0
View file @
3f951c73
#!/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
handlers/main.yml
View file @
8e2e22a3
-
name
:
Apply no subscription patch
shell
:
/usr/local/lib/pve-no-subscription-patcher
---
# Update packages list
-
name
:
Update packages list
apt
:
update_cache
:
yes
meta/main.yml
View file @
8e2e22a3
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.
tasks/proxmox/main.yml
View file @
8e2e22a3
---
# 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