Ansible/roles/geerlingguy.ansible/tasks/setup-Debian.yml

24 lines
717 B
YAML
Raw Normal View History

---
- 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"
when: ansible_distribution_version | int < 9
- name: Update apt cache.
apt: update_cache=true cache_valid_time=86400
- 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 }}"