2017-08-16 15:41:59 +02:00
|
|
|
---
|
|
|
|
# tasks file for apt
|
|
|
|
|
2017-08-16 15:55:10 +02:00
|
|
|
# Default preferences file
|
|
|
|
- name: CONFIG default preferences
|
|
|
|
template:
|
|
|
|
src: '{{ apt_default_pref_tpl }}'
|
|
|
|
dest: '{{ apt_default_pref_path }}'
|
|
|
|
|
2017-08-17 14:09:55 +02:00
|
|
|
# Sources list {{{
|
2017-08-16 15:48:51 +02:00
|
|
|
## Purge sources.list file
|
|
|
|
- name: CONFIG remove sources.list file
|
|
|
|
file:
|
|
|
|
path: /etc/apt/sources.list
|
|
|
|
state: absent
|
|
|
|
notify: aptitude update
|
|
|
|
when: apt_purge_src_list_file
|
|
|
|
|
2017-08-16 15:41:59 +02:00
|
|
|
## Stretch
|
|
|
|
- name: CONFIG stretch official sources.list
|
|
|
|
apt_repository:
|
|
|
|
repo: "{{ item }} http://httpredir.debian.org/debian/ stretch main contrib non-free"
|
|
|
|
filename: stretch
|
|
|
|
update_cache: no
|
|
|
|
with_items:
|
|
|
|
- deb
|
|
|
|
- deb-src
|
2017-08-16 15:44:57 +02:00
|
|
|
notify: aptitude update
|
2017-08-16 15:41:59 +02:00
|
|
|
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"
|
|
|
|
filename: stretch.bpo
|
|
|
|
update_cache: no
|
|
|
|
with_items:
|
|
|
|
- backports
|
2017-08-16 15:44:57 +02:00
|
|
|
notify: aptitude update
|
2017-08-16 15:41:59 +02:00
|
|
|
when: apt_src_list_manage and apt_stretch_manage
|
2017-08-17 14:09:55 +02:00
|
|
|
# }}}
|
|
|
|
|
2017-08-17 14:27:13 +02:00
|
|
|
# Packages {{{
|
2017-08-17 14:09:55 +02:00
|
|
|
- name: Ensure useful tools packages
|
|
|
|
apt:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: '{{ apt_tools_state }}'
|
|
|
|
with_items:
|
|
|
|
- '{{ apt_tools_list }}'
|
|
|
|
when: apt_tools_manage
|
2017-08-17 14:27:13 +02:00
|
|
|
|
|
|
|
- name: Ensure to purge useless packages
|
|
|
|
apt:
|
|
|
|
name: '{{ item }}'
|
|
|
|
state: '{{ apt_old_pkg_state }}'
|
|
|
|
with_items:
|
|
|
|
- '{{ apt_old_pkg_list }}'
|
|
|
|
when: apt_old_pkg_manage
|
|
|
|
# }}}
|