- name: Reload systemd daemon become: true ansible.builtin.systemd_service: daemon_reload: true listen: systemd_depend_mount_restart - name: Restart systemd services become: true ansible.builtin.systemd_service: name: '{{ item }}' state: restarted listen: systemd_depend_mount_restart loop: "{{ systemd_depend_mount_result.results | selectattr('changed', 'equalto', true) | map(attribute='service') | list }}"