Added pve-subscribe role

This role disables subscription dialog after logging in to PVE's web-ui
This commit is contained in:
Jan 2019-01-04 19:44:57 +01:00 committed by Jan-Jonas Sämann
parent f8b80258e3
commit 16bd6ae321
5 changed files with 18 additions and 0 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
__pycache__
site.retry
*.pyc
hosts.debug

View File

@ -0,0 +1 @@
DPkg::Post-Invoke { "/usr/local/bin/pve-subscribe"; };

View File

@ -0,0 +1,5 @@
#!/bin/bash
# Disable annoying license dialog
# by Sprinter
#
sed -i.bak 's/NotFound/Active/g' /usr/share/perl5/PVE/API2/Subscription.pm && systemctl restart pveproxy.service

View File

@ -0,0 +1,10 @@
---
- name: Installing pve-subscribe script
copy: src=pve-subscribe dest=/usr/local/bin/pve-subscribe mode=0755 owner=root
- name: Configuring cron to run pve-subscribe hook after reboot
cron: name=pve-subscribe special_time=reboot job=/etc/cron.d/pve-subscribe
- name: Configuring apt to run pve-subscribe hook
copy: src=apt-pve-subscribe dest=/etc/apt/apt.conf.d/99pve-subscribe mode=0644

View File

@ -4,3 +4,4 @@
hosts: all
roles:
- vmhost
- pve-subscribe