21 lines
665 B
YAML
21 lines
665 B
YAML
---
|
|
- name: Enable Backports repository.
|
|
apt_repository:
|
|
repo: >-
|
|
deb http://ftp.debian.org/debian
|
|
{{ ansible_distribution_release }}-backports main'
|
|
state: present
|
|
filename: "{{ ansible_distribution_release }}_backports"
|
|
update_cache: true
|
|
when: ansible_distribution_version | int < 9
|
|
|
|
- name: Set the default_release option for older Debian versions.
|
|
set_fact:
|
|
ansible_default_release: "{{ ansible_distribution_release }}-backports"
|
|
when: ansible_distribution_version | int < 9
|
|
|
|
- name: Install Ansible.
|
|
apt:
|
|
name: ansible
|
|
state: "{{ ansible_package_state }}"
|
|
default_release: "{{ ansible_default_release }}"
|