Fixed regression with AmazonLinux Docker install, increased coverage of

testing Docker installation as Fedora was missing python-dnf dependency.
This commit is contained in:
Xan Manning 2019-12-09 17:53:37 +00:00
parent ec61e0b4ce
commit 99c103a14f
3 changed files with 25 additions and 1 deletions

View file

@ -21,9 +21,13 @@ env:
# Test installing docker
- MOLECULE_DISTRO: geerlingguy/docker-centos7-ansible:latest
MOLECULE_PLAYBOOK: playbook-docker.yml
- MOLECULE_DISTRO: geerlingguy/docker-ubuntu1804-ansible:latest
MOLECULE_PLAYBOOK: playbook-docker.yml
- MOLECULE_DISTRO: geerlingguy/docker-amazonlinux2-ansible:latest
MOLECULE_PLAYBOOK: playbook-docker.yml
# Test using alternate port and using wireguard as the flannel backend
- MOLECULE_DISTRO: geerlingguy/docker-fedora30-ansible:latest
- MOLECULE_DISTRO: geerlingguy/docker-fedora31-ansible:latest
MOLECULE_PLAYBOOK: playbook-docker-altport-wireguard.yml
# Test disabling all deployments

View file

@ -0,0 +1,10 @@
---
- name: Ensure docker is installed using amazon-linux-extras
command: amazon-linux-extras install docker
args:
creates: /etc/docker
notify:
- restart docker
- meta: flush_handlers

View file

@ -1,5 +1,15 @@
---
- name: Ensure python-dnf is installed
package:
name: "{{ 'python-dnf' if ansible_python_version is version_compare('3.0.0', '<') else 'python3-dnf' }}"
state: present
register: ensure_python_dnf_installed
until: ensure_python_dnf_installed is succeeded
retries: 3
delay: 10
when: ansible_pkg_mgr == 'dnf'
- name: Ensure Docker prerequisites are installed
yum:
name: