Fix broken Fedora 27 test, clean up uninstall task.

master
Jeff Geerling 2018-10-22 23:32:38 -05:00
parent a42939be87
commit d3afc01efc
5 changed files with 12 additions and 29 deletions

View File

@ -7,14 +7,11 @@ env:
- ROLE_NAME: docker
matrix:
- MOLECULE_DISTRO: centos7
MOLECULE_DOCKER_COMMAND: /usr/lib/systemd/systemd
- MOLECULE_DISTRO: ubuntu1804
- MOLECULE_DISTRO: ubuntu1604
- MOLECULE_DISTRO: ubuntu1404
MOLECULE_DOCKER_COMMAND: /sbin/init
- MOLECULE_DISTRO: debian9
# - MOLECULE_DISTRO: fedora27
# MOLECULE_DOCKER_COMMAND: /usr/lib/systemd/systemd
- MOLECULE_DISTRO: fedora27
install:
# Install test dependencies.

View File

@ -9,8 +9,10 @@ lint:
config-file: molecule/default/yaml-lint.yml
platforms:
- name: instance
image: geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible
command: ${MOLECULE_DOCKER_COMMAND:-"sleep infinity"}
image: geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
pre_build_image: true
provisioner:

View File

@ -1,14 +0,0 @@
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
assert f.group == 'root'

View File

@ -1,11 +1,10 @@
---
- name: Ensure old versions of Docker are not installed.
package:
name: '{{ item }}'
name:
- docker
- docker-engine
state: absent
with_items:
- docker
- docker-engine
- name: Ensure dependencies are installed.
apt:

View File

@ -1,12 +1,11 @@
---
- name: Ensure old versions of Docker are not installed.
package:
name: '{{ item }}'
name:
- docker
- docker-common
- docker-engine
state: absent
with_items:
- docker
- docker-common
- docker-engine
- name: Add Docker GPG key.
rpm_key: