Fix broken Fedora 27 test, clean up uninstall task.

This commit is contained in:
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 - ROLE_NAME: docker
matrix: matrix:
- MOLECULE_DISTRO: centos7 - MOLECULE_DISTRO: centos7
MOLECULE_DOCKER_COMMAND: /usr/lib/systemd/systemd
- MOLECULE_DISTRO: ubuntu1804 - MOLECULE_DISTRO: ubuntu1804
- MOLECULE_DISTRO: ubuntu1604 - MOLECULE_DISTRO: ubuntu1604
- MOLECULE_DISTRO: ubuntu1404 - MOLECULE_DISTRO: ubuntu1404
MOLECULE_DOCKER_COMMAND: /sbin/init
- MOLECULE_DISTRO: debian9 - MOLECULE_DISTRO: debian9
# - MOLECULE_DISTRO: fedora27 - MOLECULE_DISTRO: fedora27
# MOLECULE_DOCKER_COMMAND: /usr/lib/systemd/systemd
install: install:
# Install test dependencies. # Install test dependencies.

View File

@ -9,8 +9,10 @@ lint:
config-file: molecule/default/yaml-lint.yml config-file: molecule/default/yaml-lint.yml
platforms: platforms:
- name: instance - name: instance
image: geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible image: geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest
command: ${MOLECULE_DOCKER_COMMAND:-"sleep infinity"} command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true privileged: true
pre_build_image: true pre_build_image: true
provisioner: 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. - name: Ensure old versions of Docker are not installed.
package: package:
name: '{{ item }}' name:
- docker
- docker-engine
state: absent state: absent
with_items:
- docker
- docker-engine
- name: Ensure dependencies are installed. - name: Ensure dependencies are installed.
apt: apt:

View File

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