2015-01-05 16:04:36 +01:00
|
|
|
---
|
2016-08-31 02:20:35 +02:00
|
|
|
- name: Enable Backports repository.
|
|
|
|
apt_repository:
|
2018-09-26 05:29:54 +02:00
|
|
|
repo: >-
|
|
|
|
deb http://ftp.debian.org/debian
|
|
|
|
{{ ansible_distribution_release }}-backports main'
|
2016-08-31 02:20:35 +02:00
|
|
|
state: present
|
|
|
|
filename: "{{ ansible_distribution_release }}_backports"
|
2020-07-22 18:40:16 +02:00
|
|
|
update_cache: true
|
2019-05-05 04:35:20 +02:00
|
|
|
when: ansible_distribution_version | int < 9
|
2015-01-05 16:04:36 +01:00
|
|
|
|
2018-09-26 05:56:00 +02:00
|
|
|
- name: Set the default_release option for older Debian versions.
|
|
|
|
set_fact:
|
|
|
|
ansible_default_release: "{{ ansible_distribution_release }}-backports"
|
2019-05-05 04:35:20 +02:00
|
|
|
when: ansible_distribution_version | int < 9
|
2018-09-26 05:56:00 +02:00
|
|
|
|
2015-01-05 16:04:36 +01:00
|
|
|
- name: Install Ansible.
|
2016-08-31 02:20:35 +02:00
|
|
|
apt:
|
|
|
|
name: ansible
|
2018-10-04 21:40:07 +02:00
|
|
|
state: "{{ ansible_package_state }}"
|
2018-09-26 05:56:00 +02:00
|
|
|
default_release: "{{ ansible_default_release }}"
|