From 6bf16a181acde951198c939e344e292f13ad4f4c Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 15 Dec 2021 15:59:58 +0100 Subject: [PATCH] [ansible] Deploy buster-backports repository only on Debian 10 Signed-off-by: Yohann D'ANELLO --- ansible/base.yml | 2 +- ansible/roles/1-apt-basic/tasks/main.yml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ansible/base.yml b/ansible/base.yml index 83b20cbb..05e63b1c 100755 --- a/ansible/base.yml +++ b/ansible/base.yml @@ -7,7 +7,7 @@ prompt: "Password of the database (leave it blank to skip database init)" private: yes vars: - mirror: mirror.crans.org + mirror: eclats.crans.org roles: - 1-apt-basic - 2-nk20 diff --git a/ansible/roles/1-apt-basic/tasks/main.yml b/ansible/roles/1-apt-basic/tasks/main.yml index 7c57646f..bbef195a 100644 --- a/ansible/roles/1-apt-basic/tasks/main.yml +++ b/ansible/roles/1-apt-basic/tasks/main.yml @@ -1,14 +1,15 @@ --- -- name: Add buster-backports to apt sources +- name: Add buster-backports to apt sources if needed apt_repository: repo: deb http://{{ mirror }}/debian buster-backports main state: present - when: ansible_facts['distribution'] == "Debian" + when: + - ansible_distribution == "Debian" + - ansible_distribution_major_version | int == 10 - name: Install note_kfet APT dependencies apt: update_cache: true - default_release: "{{ 'buster-backports' if ansible_facts['distribution'] == 'Debian' }}" install_recommends: false name: # Common tools