All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 0s
75 lines
4.3 KiB
YAML
75 lines
4.3 KiB
YAML
---
|
|
- name: Manage APT Repositories
|
|
hosts:
|
|
- harbor.guaranteedstruggle.host
|
|
- ansible-slut.guaranteedstruggle.host
|
|
become: true # Required for managing system-level configurations
|
|
|
|
tasks:
|
|
#### TODO добавить указание что всё управляется ансиболью
|
|
|
|
|
|
#### TODO WUT :: чому нормально не раскидывается в контейнере?
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb https://nexus.guaranteedstruggle.host/repository/generic-deb-debian-org/ {{ ansible_distribution_release }} main non-free-firmware' # Replace with your desired repository
|
|
state: present
|
|
#filename: /etc/apt/sources.list
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb-src https://nexus.guaranteedstruggle.host/repository/generic-deb-debian-org/ {{ ansible_distribution_release }} main non-free-firmware' # Replace with your desired repository
|
|
state: present
|
|
#filename: /etc/apt/sources.list
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb http://deb.debian.org/debian/ {{ ansible_distribution_release }} main non-free-firmware' # Replace with your desired repository
|
|
state: absent
|
|
#filename: /etc/apt/sources.list
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb-src http://deb.debian.org/debian/ {{ ansible_distribution_release }} main non-free-firmware' # Replace with your desired repository
|
|
state: absent
|
|
#filename: /etc/apt/sources.list
|
|
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb https://nexus.guaranteedstruggle.host/repository/generic-security-debian/ {{ ansible_distribution_release }}-security main non-free-firmware' # Replace with your desired repository
|
|
state: present
|
|
#filename: /etc/apt/sources.list
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb-src https://nexus.guaranteedstruggle.host/repository/generic-security-debian/ bookworm-security main non-free-firmware' # Replace with your desired repository
|
|
state: present
|
|
#filename: /etc/apt/sources.list
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb http://security.debian.org/debian-security {{ ansible_distribution_release }}-security main non-free-firmware' # Replace with your desired repository
|
|
state: absent
|
|
#filename: /etc/apt/sources.list
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware' # Replace with your desired repository
|
|
state: absent
|
|
#filename: /etc/apt/sources.list
|
|
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb https://nexus.guaranteedstruggle.host/repository/generic-deb-debian-org/ {{ ansible_distribution_release }}-updates main non-free-firmware' # Replace with your desired repository
|
|
state: present
|
|
#filename: /etc/apt/sources.list
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb-src https://nexus.guaranteedstruggle.host/repository/generic-deb-debian-org/ {{ ansible_distribution_release }}-updates main non-free-firmware' # Replace with your desired repository
|
|
state: present
|
|
#filename: /etc/apt/sources.list
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb http://deb.debian.org/debian/ {{ ansible_distribution_release }}-updates main non-free-firmware' # Replace with your desired repository
|
|
state: absent
|
|
#filename: /etc/apt/sources.list
|
|
- ansible.builtin.apt_repository:
|
|
repo: 'deb-src http://deb.debian.org/debian/ {{ ansible_distribution_release }}-updates main non-free-firmware' # Replace with your desired repository
|
|
state: absent
|
|
#filename: /etc/apt/sources.list
|
|
|
|
|
|
# - name: Disable an existing APT repository (by commenting out its entry)
|
|
# ansible.builtin.lineinfile:
|
|
# path: /etc/apt/sources.list # Replace with the path to the .list file of the repository to disable
|
|
# regexp: '^(http://security.debian.org/debian-security .*)$' # Matches lines starting with 'deb '
|
|
# line: '# \g<1>' # Comments out the matched line
|
|
# backrefs: true # Required to use backreferences in the 'line' parameter
|
|
# state: present # Ensure the line is present (commented out)
|
|
|
|
- name: Ensure apt cache is updated after changes
|
|
ansible.builtin.apt:
|
|
update_cache: yes |