fix: Docker still doesn't work
This commit is contained in:
parent
f664f99bb2
commit
9b5356397f
@ -47,6 +47,10 @@
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
|
||||
- name: Show molecule inventory
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ molecule_inventory }}"
|
||||
|
||||
- name: Dump molecule_inventory
|
||||
ansible.builtin.copy:
|
||||
content: |
|
||||
@ -77,3 +81,30 @@
|
||||
- name: Display uname info
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ result.stdout }}"
|
||||
|
||||
|
||||
# Prepare DinD
|
||||
- name: Prepare DinD
|
||||
hosts: molecule
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- name: Update apt
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
cache_valid_time: 600
|
||||
when: "ansible_facts.os_family == 'Debian'"
|
||||
|
||||
- name: Install python dependencies
|
||||
ansible.builtin.pip:
|
||||
name:
|
||||
- requests
|
||||
- docker
|
||||
- docker-compose
|
||||
- ansible
|
||||
|
||||
- name: Install docker
|
||||
vars:
|
||||
docker_service_manage: false
|
||||
ansible.builtin.include_role:
|
||||
name: "geerlingguy.docker"
|
||||
|
||||
|
@ -5,5 +5,18 @@ dependency:
|
||||
requirements-file: molecule/default/requirements.yml
|
||||
platforms:
|
||||
- name: molecule-ubuntu
|
||||
image: ubuntu:18.04
|
||||
image: geerlingguy/docker-ubuntu1804-ansible:latest
|
||||
privileged: true
|
||||
pre_build_image: true
|
||||
capabilities:
|
||||
- SYS_ADMIN
|
||||
tmpfs:
|
||||
- /tmp
|
||||
- /run
|
||||
- /run/lock
|
||||
volumes:
|
||||
- '/sys/fs/cgroup:/sys/fs/cgroup:ro'
|
||||
- '/var/run/docker.sock:/tmp/docker_mounted.sock'
|
||||
command: 'lib/systemd/systemd'
|
||||
stop_signal: 'RTMIN+3'
|
||||
|
||||
|
@ -1,2 +1,5 @@
|
||||
collections:
|
||||
- community.docker
|
||||
- community.docker
|
||||
|
||||
roles:
|
||||
- name: geerlingguy.docker
|
Loading…
Reference in New Issue
Block a user