Fix failing Debian tests.

This commit is contained in:
Jeff Geerling 2018-09-25 22:56:00 -05:00
parent 95963937d4
commit 480b3fe831
3 changed files with 10 additions and 1 deletions

View File

@ -10,6 +10,7 @@ env:
- MOLECULE_DISTRO: fedora27
- MOLECULE_DISTRO: ubuntu1804
- MOLECULE_DISTRO: debian9
- MOLECULE_DISTRO: debian8
install:
# Install test dependencies.

2
defaults/main.yml Normal file
View File

@ -0,0 +1,2 @@
---
ansible_default_release: ""

View File

@ -6,12 +6,18 @@
{{ ansible_distribution_release }}-backports main'
state: present
filename: "{{ ansible_distribution_release }}_backports"
when: ansible_distribution_version < 9
- name: Update apt cache.
apt: update_cache=yes 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 < 9
- name: Install Ansible.
apt:
name: ansible
state: present
default_release: "{{ ansible_distribution_release }}-backports"
default_release: "{{ ansible_default_release }}"