Files
ansible_role_proxmox_provision/tasks/repos.yml
Jose e0a3c2464b
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 12s
Gitleaks Scan / gitleaks (push) Successful in 5s
Markdown Lint / markdown-lint (push) Successful in 5s
ai-reviews / Review PR (pull_request) Successful in 18s
PR check / Gitleaks (pull_request) Successful in 4s
PR check / lint tests (pull_request) Successful in 14s
PR check / labeler (pull_request) Successful in 3s
PR check / handle_failures (pull_request) Has been skipped
PR check / handle_success (pull_request) Successful in 1s
chore 📦: Remove unused repository management task
This commit removes an unused repository management task from the build process to clean up unnecessary steps and streamline the workflow.
2026-02-15 08:12:23 +01:00

50 lines
1.6 KiB
YAML

---
- name: repos | Manage Proxmox repositories
vars:
repo_path:
- http://download\.proxmox\.com/debian/pve\
block:
# Proxmox enterprise repo
- name: repos | Check for Proxmox enterprise repo file
ansible.builtin.stat:
path: /etc/apt/sources.list.d/pve-enterprise.list
register: pve_enterprise_repo
- name: repos | Comment out Proxmox enterprise repo lines
ansible.builtin.replace:
path: /etc/apt/sources.list.d/pve-enterprise.list
regexp: '^\s*deb\s+'
replace: '# deb '
when: pve_enterprise_repo.stat.exists
notify: Run apt update
# Proxmox no-subscription repo
- name: repos | Check for pve-install-repo.list
ansible.builtin.stat:
path: /etc/apt/sources.list.d/pve-install-repo.list
register: pve_install_repo
- name: repos | Uncomment Proxmox no-subscription repo if present
ansible.builtin.replace:
path: /etc/apt/sources.list.d/pve-install-repo.list
regexp: '^\s*#\s*(deb\s+.*pve-no-subscription)'
replace: '\1'
when: pve_install_repo.stat.exists
notify: Run apt update
- name: repos | Add Proxmox no-subscription repo if missing
ansible.builtin.lineinfile:
path: /etc/apt/sources.list.d/pve-install-repo.list
regexp: '^\s*deb\s+.*pve-no-subscription\s*$'
line: >-
deb http://download.proxmox.com/debian/pve
{{ ansible_distribution_release }}
pve-no-subscription
state: present
insertafter: EOF
when: pve_install_repo.stat.exists
notify: Run apt update