From 9412cedba43319a18b9fd05ead36fd850d9aec26 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 23 Sep 2023 10:28:50 +0200 Subject: docker: move handlers to handlers/ --- roles/docker/tasks/logging.yml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'roles/docker/tasks') diff --git a/roles/docker/tasks/logging.yml b/roles/docker/tasks/logging.yml index 27e78d4..8f861a3 100644 --- a/roles/docker/tasks/logging.yml +++ b/roles/docker/tasks/logging.yml @@ -32,18 +32,7 @@ owner: root group: root mode: '644' - register: docker_config + notify: docker_configured -- name: Restart Docker if necessary - become: true - when: docker_config.changed - block: - - name: Collect service facts - ansible.builtin.service_facts: - - - name: Restart Docker service - when: | - 'docker.service' in ansible_facts.services and ansible_facts.services['docker.service'].state == 'running' - ansible.builtin.systemd_service: - name: docker - state: restarted +- name: Restart Docker service if necessary + ansible.builtin.meta: flush_handlers -- cgit v1.2.3