2021-02-05 10:51:39 +01:00
|
|
|
---
|
2021-07-01 17:36:56 +02:00
|
|
|
- name: ensure apt.conf exists
|
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: apt.conf
|
|
|
|
dest: "{{ apt_proxy_apt_conf_path | default ('/etc/apt/apt.conf') }}"
|
|
|
|
backup: yes
|
2021-10-20 19:48:17 +02:00
|
|
|
notify: update package lists
|
2021-02-05 10:51:39 +01:00
|
|
|
|
|
|
|
- name: remove enterprise-Repository
|
|
|
|
become: yes
|
|
|
|
ansible.builtin.file:
|
2023-06-23 16:04:19 +02:00
|
|
|
path: "{{ manage_sources_proxmox_enterprise_repo_path }}"
|
2021-02-05 10:51:39 +01:00
|
|
|
state: absent
|
|
|
|
|
|
|
|
- name: check if pve-no-subscription repo keys exists
|
|
|
|
stat:
|
2023-06-23 16:04:19 +02:00
|
|
|
path: "{{ manage_sources_proxmox_apt_repo_key_path }}"
|
2021-02-05 10:51:39 +01:00
|
|
|
register: pve_no_subscription_repo_keys
|
|
|
|
|
|
|
|
- name: add pve-no-subscription repo keys
|
|
|
|
become: yes
|
|
|
|
ansible.builtin.apt_key:
|
2023-06-23 16:04:19 +02:00
|
|
|
url: "{{ manage_sources_proxmox_apt_repo_key_url }}"
|
2021-02-05 10:51:39 +01:00
|
|
|
state: present
|
2021-10-20 19:48:17 +02:00
|
|
|
notify: update package lists
|
2021-03-10 14:50:54 +01:00
|
|
|
when: pve_no_subscription_repo_keys.stat.exists == false
|
2021-02-05 10:51:39 +01:00
|
|
|
|
|
|
|
- name: add pve-no-subscription repo
|
|
|
|
become: yes
|
|
|
|
ansible.builtin.apt_repository:
|
2023-06-23 16:04:19 +02:00
|
|
|
repo: "{{ manage_sources_proxmox_apt_repo_no_subscription }}"
|
2021-02-05 10:51:39 +01:00
|
|
|
state: present
|
|
|
|
filename: pve-no-subscription
|
|
|
|
update_cache: no
|
2021-10-20 19:48:17 +02:00
|
|
|
notify: update package lists
|