ansible-role-ansible/tasks/setup-Debian.yml

22 lines
665 B
YAML
Raw Normal View History

---
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"
update_cache: true
when: ansible_distribution_version | int < 9
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"
when: ansible_distribution_version | int < 9
2018-09-26 05:56:00 +02:00
- name: Install Ansible.
2016-08-31 02:20:35 +02:00
apt:
name: ansible
state: "{{ ansible_package_state }}"
2018-09-26 05:56:00 +02:00
default_release: "{{ ansible_default_release }}"