ansible-roles/apt/tasks/backports.yml

34 lines
710 B
YAML
Raw Normal View History

2017-01-10 10:18:42 +01:00
---
2017-06-07 09:53:42 +02:00
- name: No backports config in default sources.list
lineinfile:
dest: /etc/apt/sources.list
regexp: "backports"
state: absent
tags:
- apt
2017-01-10 10:18:42 +01:00
- name: Backports sources list is installed
template:
src: '{{ ansible_distribution_release }}_backports.list.j2'
2017-01-10 10:18:42 +01:00
dest: /etc/apt/sources.list.d/backports.list
force: yes
mode: "0640"
2017-01-10 10:18:42 +01:00
notify: apt update
tags:
- apt
2017-01-10 10:18:42 +01:00
- name: Backports configuration
copy:
src: '{{ ansible_distribution_release }}_backports_preferences'
dest: /etc/apt/preferences.d/0-backports-defaults
2017-01-10 10:18:42 +01:00
force: yes
mode: "0640"
2017-01-10 10:18:42 +01:00
notify: apt update
tags:
- apt
- name: Intermediate flush of handlers
meta: flush_handlers
tags:
- apt