aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/docker/handlers/main.yml
blob: 1810b19b842b750fbf66fbfeb53ca1a3900936fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
- name: Collect service facts
  ansible.builtin.service_facts:
  listen: docker_configured

- name: Restart Docker service
  become: true
  when: |
    'docker.service' in ansible_facts.services and ansible_facts.services['docker.service'].state == 'running'
  ansible.builtin.systemd_service:
    name: docker
    state: restarted
  listen: docker_configured