zuul-jobs/roles/ensure-docker/handlers/main.yaml
Tristan Cacqueray 6cd8980fc3 ensure-docker: prevent issue on centos-7 where the socket does not exists
This change mitigate an issue introduced by
https://review.opendev.org/c/zuul/zuul-jobs/+/787271

Fixes: https://bugs.launchpad.net/tripleo/+bug/1925372
Change-Id: I49f527b1c8a16e0b9f1718f23a960733003909ca
2021-04-21 17:12:09 +00:00

34 lines
671 B
YAML

---
- name: Stop docker.socket to avoid any conflict
become: true
service:
name: docker.socket
enabled: yes
state: stopped
listen: Restart docker
failed_when: false
- name: Assure docker service is running
become: true
service:
name: docker
enabled: yes
state: started
listen: Restart docker
- name: Assure docker.socket service is running
become: true
service:
name: docker.socket
enabled: yes
state: started
listen: Restart docker
failed_when: false
- name: Correct group ownership on docker sock
become: true
file:
path: /var/run/docker.sock
group: "{{ docker_group }}"
listen: Restart docker