Improve tests: don't install daemon when running inside a container (#56)

* If running inside a container, only install docker CLI, not docker daemon.

ci_complete

* Fix OpenSUSE.
This commit is contained in:
Felix Fontein
2020-12-23 13:36:40 +01:00
committed by GitHub
parent a1a7692e74
commit 5fa53e2eeb
14 changed files with 31 additions and 12 deletions
@@ -7,6 +7,13 @@
- name: Setup Docker
when: ansible_facts.distribution ~ ansible_facts.distribution_major_version not in ['CentOS6', 'RedHat6']
block:
- name: Detect whether we are running inside a container
current_container_facts:
- name: Determine whether Docker Daemon needs to be installed
set_fact:
needs_docker_daemon: '{{ not ansible_module_running_in_container }}'
- name: Include distribution specific variables
include_vars: "{{ lookup('first_found', params) }}"
vars:
@@ -136,9 +143,6 @@
when: docker_cli_version is version('0.0', '>')
- name: Detect whether we are running inside a container
current_container_facts:
- name: Inspect current container
docker_container_info:
name: "{{ ansible_module_container_id }}"