diff --git a/tasks/main.yml b/tasks/main.yml index be036cd..a2710b9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -38,12 +38,16 @@ src: traefik.yaml.j2 dest: "/etc/traefik/traefik.yaml" + - name: "Reload systemd" + ansible.builtin.systemd: + daemon_reload: true + when: ansible_service_mgr == "systemd" + + - name: Start Traefik + systemd_service: + enabled: true + name: traefik + state: started notify: - - Reload systemd - Restart traefik -- name: Start Traefik - systemd_service: - enabled: true - name: traefik - state: started