mirror of
https://github.com/Maks1mS/ansible-role-docker.git
synced 2024-12-24 00:33:04 +03:00
Fix broken Fedora 27 test, clean up uninstall task.
This commit is contained in:
parent
a42939be87
commit
d3afc01efc
@ -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.
|
||||
|
@ -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:
|
||||
|
@ -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'
|
@ -1,11 +1,10 @@
|
||||
---
|
||||
- name: Ensure old versions of Docker are not installed.
|
||||
package:
|
||||
name: '{{ item }}'
|
||||
state: absent
|
||||
with_items:
|
||||
name:
|
||||
- docker
|
||||
- docker-engine
|
||||
state: absent
|
||||
|
||||
- name: Ensure dependencies are installed.
|
||||
apt:
|
||||
|
@ -1,12 +1,11 @@
|
||||
---
|
||||
- name: Ensure old versions of Docker are not installed.
|
||||
package:
|
||||
name: '{{ item }}'
|
||||
state: absent
|
||||
with_items:
|
||||
name:
|
||||
- docker
|
||||
- docker-common
|
||||
- docker-engine
|
||||
state: absent
|
||||
|
||||
- name: Add Docker GPG key.
|
||||
rpm_key:
|
||||
|
Loading…
Reference in New Issue
Block a user