Skip to content
Snippets Groups Projects
Commit 8cb693a9 authored by Thomas Schneider's avatar Thomas Schneider
Browse files

apt/repositories: Update cache only once at the end

parent d96715da
Branches
No related tags found
1 merge request!26Update CI to reasonable versions and fix resulting issues
......@@ -6,6 +6,7 @@
apt_repository:
state: present
repo: "deb{{ src }} {{ apt_mirror }} {{ ansible_distribution_release }}{{ item[1] }} {{ item[0] }}"
update_cache: false
with_nested:
- "{{ apt_repos }}"
- "{{ apt_sets|union([''])|unique }}"
......@@ -19,6 +20,7 @@
apt_repository:
state: absent
repo: "deb{{ src }} {{ apt_mirror }} {{ ansible_distribution_release }}{{ item[1] }} {{ item[0] }}"
update_cache: false
with_nested:
- "{{ apt_repos }}"
- "{{ ['', '-updates', '-backports', '-proposed-updates']|difference(apt_sets|union([''])) }}"
......@@ -32,6 +34,7 @@
apt_repository:
state: absent
repo: "deb{{ src }} {{ apt_mirror }} {{ ansible_distribution_release }}{{ item[1] }} {{ item[0] }}"
update_cache: false
with_nested:
- "{{ ['main', 'contrib', 'non-free']|difference(apt_repos) }}"
- ['', '-updates', '-backports', '-proposed-updates']
......@@ -45,6 +48,7 @@
apt_repository:
state: present
repo: "deb{{ src }} {{ apt_mirror_security }} {{ ansible_distribution_release }}{{ item[1] }} {{ item[0] }}"
update_cache: false
with_nested:
- "{{ apt_repos }}"
- "{{ ['/updates'] if ansible_distribution_major_version|int(default=99) < 11 else ['-security'] }}"
......@@ -59,6 +63,7 @@
apt_repository:
state: absent
repo: "deb{{ src }} {{ apt_mirror_security }} {{ ansible_distribution_release }}{{ item[1] }} {{ item[0] }}"
update_cache: false
with_nested:
- "{{ ['main', 'contrib', 'non-free']|difference(apt_repos) }}"
- "{{ ['/updates'] if ansible_distribution_major_version|int(default=99) < 11 else ['-security'] }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment