vh-ansible/roles/pve-subscribe/tasks/no-subscription.yml
Jan-Jonas Sämann 17eac6723b Added conditional repo config to pve-subscribe
This commit introduces a new inventory host variable:
 pve_enterprise=False
If set to True, apt sources and environment on the target is configured for
subscribed operation. If set to False annoying "subscribe me" popups are
disabled and apt sources are configured to the no-subscription
repositorys. The default value is False.

Proxmox's default state after installation is similar to
pve_enterprise=True.

This Role must be called before first apt call.
2019-01-05 23:14:33 +01:00

17 lines
634 B
YAML

---
- name: Unset enterprise repo
file: path=/etc/apt/sources.list.d/pve-enterprise.list state=absent
- name: Configuring no-subscription repo
copy: src=pve-no-subscription.list dest=/etc/apt/sources.list.d/pve-no-subscription.list
- 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