summaryrefslogtreecommitdiff
path: root/roles/apt-repo
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-05-10 00:19:23 +0200
committerChristian Pointner <equinox@spreadspace.org>2024-05-10 00:19:23 +0200
commit6abc58229f057a63e1799c834538d5fb139c6e22 (patch)
tree80c6639e569e2e83640d7fcce5b39d258aa6dd06 /roles/apt-repo
parentmake debian/ubuntu os release compare script much more generic (diff)
migrate all os release comparisons to use new filter
Diffstat (limited to 'roles/apt-repo')
-rw-r--r--roles/apt-repo/backports/defaults/main.yml2
-rw-r--r--roles/apt-repo/base/defaults/main.yml2
-rw-r--r--roles/apt-repo/blackmagic/tasks/main.yml4
3 files changed, 4 insertions, 4 deletions
diff --git a/roles/apt-repo/backports/defaults/main.yml b/roles/apt-repo/backports/defaults/main.yml
index 83aae81a..2d44e282 100644
--- a/roles/apt-repo/backports/defaults/main.yml
+++ b/roles/apt-repo/backports/defaults/main.yml
@@ -10,4 +10,4 @@ apt_repo_backports_components:
ubuntu:
- main
- universe
- debian: "{{ ((ansible_distribution_major_version | int) <= 11) | ternary(_apt_repo_backports_components_debian_.until_bullseye, _apt_repo_backports_components_debian_.after_bullseye) }}"
+ debian: "{{ (ansible_distribution == 'Debian' and (ansible_distribution_release | debian_release_compare('<=', 'bullseye'))) | ternary(_apt_repo_base_components_debian_.until_bullseye, _apt_repo_base_components_debian_.after_bullseye) }}"
diff --git a/roles/apt-repo/base/defaults/main.yml b/roles/apt-repo/base/defaults/main.yml
index e7e48029..51585b41 100644
--- a/roles/apt-repo/base/defaults/main.yml
+++ b/roles/apt-repo/base/defaults/main.yml
@@ -10,7 +10,7 @@ apt_repo_base_components:
ubuntu:
- main
- universe
- debian: "{{ (ansible_distribution_release | debian_release_compare('<=', 'bullseye')) | ternary(_apt_repo_base_components_debian_.until_bullseye, _apt_repo_base_components_debian_.after_bullseye) }}"
+ debian: "{{ (ansible_distribution == 'Debian' and (ansible_distribution_release | debian_release_compare('<=', 'bullseye'))) | ternary(_apt_repo_base_components_debian_.until_bullseye, _apt_repo_base_components_debian_.after_bullseye) }}"
raspbian:
- main
- rpi
diff --git a/roles/apt-repo/blackmagic/tasks/main.yml b/roles/apt-repo/blackmagic/tasks/main.yml
index 219b83e3..e376fe9f 100644
--- a/roles/apt-repo/blackmagic/tasks/main.yml
+++ b/roles/apt-repo/blackmagic/tasks/main.yml
@@ -18,7 +18,7 @@
- name: configure repo authentication
when:
- ansible_distribution == "Debian"
- - (ansible_distribution_major_version | int) < 10
+ - (ansible_distribution_release | debian_release_compare('<', 'buster'))
lineinfile:
path: /etc/apt/auth.conf
regexp: "^machine build.spreadspace.org "
@@ -29,7 +29,7 @@
- name: configure repo authentication
when: (ansible_distribution == "Ubuntu") or
- (ansible_distribution == "Debian" and (ansible_distribution_major_version | int) >= 10)
+ (ansible_distribution == "Debian" and (ansible_distribution_release | debian_release_compare('>=', 'buster')))
block:
- name: remove old repo authentication
lineinfile: