From db2aba101c24163269e409ea6e6a78f1a8c88966 Mon Sep 17 00:00:00 2001 From: neingeist Date: Sat, 20 Jul 2019 07:51:54 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20use=20template=20for=20backports?= =?UTF-8?q?.list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasks/main.yml | 21 +++------------------ templates/backports.list.j2 | 2 ++ 2 files changed, 5 insertions(+), 18 deletions(-) create mode 100644 templates/backports.list.j2 diff --git a/tasks/main.yml b/tasks/main.yml index f55f8ff..315a5d1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,22 +1,7 @@ - name: install backports apt list - apt_repository: - filename: backports - repo: "deb http://ftp.de.debian.org/debian {{ansible_distribution_release}}-backports main contrib non-free" -- name: remove incomplete backports apt list - apt_repository: - filename: backports - repo: "deb http://ftp.de.debian.org/debian {{ansible_distribution_release}}-backports main" - state: absent - -- name: install backports sources apt list - apt_repository: - filename: backports - repo: "deb-src http://ftp.de.debian.org/debian {{ansible_distribution_release}}-backports main contrib non-free" -- name: remove incomplete backports sources apt list - apt_repository: - filename: backports - repo: "deb-src http://ftp.de.debian.org/debian {{ansible_distribution_release}}-backports main" - state: absent + template: + src: backports.list.j2 + dest: /etc/apt/sources.list.d/backports.list - name: remove obsolete apt lists file: path=/etc/apt/sources.list.d/{{ item }}-backports.list state=absent diff --git a/templates/backports.list.j2 b/templates/backports.list.j2 new file mode 100644 index 0000000..6702469 --- /dev/null +++ b/templates/backports.list.j2 @@ -0,0 +1,2 @@ +deb http://ftp.de.debian.org/debian {{ansible_distribution_release}}-backports main contrib non-free +deb-src http://ftp.de.debian.org/debian {{ansible_distribution_release}}-backports main contrib non-free