diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ac8801..7ee10dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +## v1.0.x + +### Enhancements +* Add Stretch-Security repository. + ## v1.0.2 ### Fix diff --git a/README.md b/README.md index 884f673..880d746 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Manage APT repos, preferences and configuration for IPR's servers. ### Sources List Manage Debian's sources.list : -* Add Stretch repositories. +* Add Stretch repositories (official, security and backports). * Remove the default `/etc/apt/sources.list` file. * Update Apt if any repositories modifications. diff --git a/tasks/repositories.yml b/tasks/repositories.yml index 29fc7a4..224094a 100644 --- a/tasks/repositories.yml +++ b/tasks/repositories.yml @@ -14,6 +14,17 @@ notify: aptitude update when: apt_src_list_manage and apt_stretch_manage +- name: CONFIG stretch security sources.list + apt_repository: + repo: "{{ item }} http://httpredir.debian.org/debian-security/ stretch/updates main contrib non-free" + filename: stretch.security + update_cache: no + with_items: + - deb + - deb-src + notify: aptitude update + when: apt_src_list_manage and apt_stretch_manage + - name: CONFIG stretch backports sources.list apt_repository: repo: "deb http://httpredir.debian.org/debian/ stretch-{{ item }} main contrib non-free" diff --git a/templates/etc/apt/preferences.d/default.pref.j2 b/templates/etc/apt/preferences.d/default.pref.j2 index 95989ed..2bfe7f1 100644 --- a/templates/etc/apt/preferences.d/default.pref.j2 +++ b/templates/etc/apt/preferences.d/default.pref.j2 @@ -1,12 +1,17 @@ # {{ ansible_managed }} {% if apt_stretch_manage %} +Explanation: Packages from Stretch Security (Stable) +Package: * +Pin: release o=Debian,a=stable,n=stretch,l=Debian-Security +Pin-Priority: 520 + Explanation: Packages from Stretch (Stable) Package: * Pin: release o=Debian,a=stable,n=stretch,l=Debian Pin-Priority: 510 -Explanation: Packages from Stretch (Stable) +Explanation: Packages from Stretch Backports (Stable) Package: * Pin: release o=Debian Backports,a=stretch-backports,n=stretch-backports,l=Debian Backports Pin-Priority: 500