Skip to content
Snippets Groups Projects
Commit 9dc42816 authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Use a template for apt sources

parent 5087b639
No related branches found
No related tags found
Loading
---
# file: roles/common/defaults/main.yml
apt_use_updates: yes
apt_use_backports: yes
deb http://ftp.halifax.rwth-aachen.de/debian/ jessie main
deb-src http://ftp.halifax.rwth-aachen.de/debian/ jessie main
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
# jessie-updates, previously known as 'volatile'
deb http://ftp.halifax.rwth-aachen.de/debian/ jessie-updates main
deb-src http://ftp.halifax.rwth-aachen.de/debian/ jessie-updates main
# jessie-backports, previously on backports.debian.org
deb http://ftp.halifax.rwth-aachen.de/debian/ jessie-backports main
deb-src http://ftp.halifax.rwth-aachen.de/debian/ jessie-backports main
deb http://ftp.halifax.rwth-aachen.de/debian/ stretch main
deb-src http://ftp.halifax.rwth-aachen.de/debian/ stretch main
deb http://security.debian.org/ stretch/updates main
deb-src http://security.debian.org/ stretch/updates main
# stretch-updates, previously known as 'volatile'
deb http://ftp.halifax.rwth-aachen.de/debian/ stretch-updates main
deb-src http://ftp.halifax.rwth-aachen.de/debian/ stretch-updates main
# stretch-backports, previously on backports.debian.org
deb http://ftp.halifax.rwth-aachen.de/debian/ stretch-backports main
deb-src http://ftp.halifax.rwth-aachen.de/debian/ stretch-backports main
...@@ -2,43 +2,23 @@ ...@@ -2,43 +2,23 @@
# file: roles/common/tasks/repositories.yml # file: roles/common/tasks/repositories.yml
- name: provide default sources.list - name: provide default sources.list
copy: src="sources.list-{{debian_version}}" dest=/etc/apt/sources.list owner=root group=root mode=0644 template:
src: sources.list
dest: /etc/apt/sources.list
owner: root
group: root
mode: 0644
tags: tags:
- packages - packages
- repos - repos
- name: add contrib and non-free - name: remove old sources
apt_repository: repo='deb http://ftp.halifax.rwth-aachen.de/debian {{debian_version}} contrib non-free' state=present file:
tags: name: "/etc/apt/sources.list.d/{{item}}.list"
- packages state: absent
- repos with_items:
- ftp_halifax_rwth_aachen_de_debian
- name: add contrib security - security_debian_org
apt_repository: repo='deb http://security.debian.org/ {{debian_version}}/updates contrib' state=present
tags:
- packages
- repos
- name: add contrib and non-free updates
apt_repository: repo='deb http://ftp.halifax.rwth-aachen.de/debian/ {{debian_version}}-updates contrib non-free' state=present
tags:
- packages
- repos
- name: add contrib and non-free source
apt_repository: repo='deb-src http://ftp.halifax.rwth-aachen.de/debian {{debian_version}} contrib non-free' state=present
tags:
- packages
- repos
- name: add contrib security source
apt_repository: repo='deb-src http://security.debian.org/ {{debian_version}}/updates contrib' state=present
tags:
- packages
- repos
- name: add contrib and non-free updates source
apt_repository: repo='deb-src http://ftp.halifax.rwth-aachen.de/debian/ {{debian_version}}-updates contrib non-free' state=present
tags: tags:
- packages - packages
- repos - repos
......
deb http://ftp.halifax.rwth-aachen.de/debian/ {{debian_version}} main contrib non-free
deb-src http://ftp.halifax.rwth-aachen.de/debian/ {{debian_version}} main contrib non-free
deb http://security.debian.org/ {{debian_version}}/updates main contrib non-free
deb-src http://security.debian.org/ {{debian_version}}/updates main contrib non-free
{% if apt_use_updates %}
deb http://ftp.halifax.rwth-aachen.de/debian/ {{debian_version}}-updates main contrib non-free
deb-src http://ftp.halifax.rwth-aachen.de/debian/ {{debian_version}}-updates main contrib non-free
{% endif %}
{% if apt_use_backports %}
deb http://ftp.halifax.rwth-aachen.de/debian/ {{debian_version}}-backports main contrib non-free
deb-src http://ftp.halifax.rwth-aachen.de/debian/ {{debian_version}}-backports main contrib non-free
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment